ETH Price: $3,608.52 (+5.26%)

Contract

0x6fF742845D45d29cb38fa075EFc889247A52Eb02
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Claim237680192025-11-10 9:38:591 hr ago1762767539IN
Lombard: Token Distributor
0 ETH0.00001780.17233083
Claim237674622025-11-10 7:46:593 hrs ago1762760819IN
Lombard: Token Distributor
0 ETH0.000016030.15517544
Claim237673362025-11-10 7:21:233 hrs ago1762759283IN
Lombard: Token Distributor
0 ETH0.000009890.09584178
Claim237664872025-11-10 4:30:476 hrs ago1762749047IN
Lombard: Token Distributor
0 ETH0.000008690.08417796
Claim237664172025-11-10 4:16:476 hrs ago1762748207IN
Lombard: Token Distributor
0 ETH0.000007790.07544622
Claim And Stake237648802025-11-09 23:07:2311 hrs ago1762729643IN
Lombard: Token Distributor
0 ETH0.000083170.16800292
Claim And Stake237647612025-11-09 22:43:3512 hrs ago1762728215IN
Lombard: Token Distributor
0 ETH0.000032550.06576886
Claim237647062025-11-09 22:32:2312 hrs ago1762727543IN
Lombard: Token Distributor
0 ETH0.000007540.07305428
Claim237636752025-11-09 19:05:1116 hrs ago1762715111IN
Lombard: Token Distributor
0 ETH0.000011450.110922
Claim237636662025-11-09 19:03:2316 hrs ago1762715003IN
Lombard: Token Distributor
0 ETH0.00001340.12976399
Claim And Stake237633862025-11-09 18:07:1117 hrs ago1762711631IN
Lombard: Token Distributor
0 ETH0.000035670.07205881
Claim237632272025-11-09 17:35:2317 hrs ago1762709723IN
Lombard: Token Distributor
0 ETH0.000007640.07399926
Claim237628302025-11-09 16:15:3518 hrs ago1762704935IN
Lombard: Token Distributor
0 ETH0.000183981.78145703
Claim And Stake237622002025-11-09 14:08:4720 hrs ago1762697327IN
Lombard: Token Distributor
0 ETH0.000051870.10477667
Claim237619792025-11-09 13:24:1121 hrs ago1762694651IN
Lombard: Token Distributor
0 ETH0.000058430.57430613
Claim237612812025-11-09 11:03:4724 hrs ago1762686227IN
Lombard: Token Distributor
0 ETH0.000183251.77353241
Claim237608292025-11-09 9:31:5925 hrs ago1762680719IN
Lombard: Token Distributor
0 ETH0.000058490.5662971
Claim237608092025-11-09 9:27:5925 hrs ago1762680479IN
Lombard: Token Distributor
0 ETH0.000059310.57416369
Claim237607682025-11-09 9:19:3525 hrs ago1762679975IN
Lombard: Token Distributor
0 ETH0.000059210.57318851
Claim237607492025-11-09 9:15:3525 hrs ago1762679735IN
Lombard: Token Distributor
0 ETH0.000059320.5743126
Claim237606952025-11-09 9:04:4726 hrs ago1762679087IN
Lombard: Token Distributor
0 ETH0.000058280.56428914
Claim237606722025-11-09 9:00:1126 hrs ago1762678811IN
Lombard: Token Distributor
0 ETH0.000059680.57769248
Claim237605722025-11-09 8:40:1126 hrs ago1762677611IN
Lombard: Token Distributor
0 ETH0.000007180.06953375
Claim237604822025-11-09 8:22:1126 hrs ago1762676531IN
Lombard: Token Distributor
0 ETH0.000008770.08495092
Claim237604382025-11-09 8:13:2326 hrs ago1762676003IN
Lombard: Token Distributor
0 ETH0.000059180.57296222
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

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

Contract Name:
TokenDistributor

Compiler Version
v0.8.28+commit.7893614a

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion

Contract Source Code (Solidity Standard Json-Input format)

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

import {Ownable, Ownable2Step} from "@openzeppelin/contracts/access/Ownable2Step.sol";
import {IERC4626} from "@openzeppelin/contracts/interfaces/IERC4626.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/Pausable.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {ReentrancyGuard} from "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";

contract TokenDistributor is Ownable2Step, Pausable, ReentrancyGuard {
    using SafeERC20 for IERC20;

    /*//////////////////////////////////////////////////////////////
                                 EVENTS
    //////////////////////////////////////////////////////////////*/

    /// @notice Emitted when a user claims tokens.
    /// @param user The user address.
    /// @param amount The amount of tokens claimed.
    event Claimed(address indexed user, uint256 amount);

    /// @notice Emitted when a user claims tokens.
    /// @param user The user identificator.
    /// @param amount The amount of tokens claimed.
    /// @param dstAddress The destination address of the claim.
    event ClaimedWithProof(
        bytes32 indexed user,
        uint256 amount,
        address dstAddress
    );

    /// @notice Emitted when the owner withdraws tokens.
    /// @param owner The owner address.
    /// @param amount The amount of tokens withdrawn.
    event Withdrawn(address indexed owner, uint256 amount);

    /// @notice Emitted when the owner changes the vault.
    /// @param oldVault The address of old vault.
    /// @param newVault The address of new vault.
    event VaultChanged(address indexed oldVault, address indexed newVault);

    /// @notice Emitted when the owner changes the approver address.
    /// @param oldApprover The address of old approver.
    /// @param newApprover The address of new approver.
    event ApproverChanged(
        address indexed oldApprover,
        address indexed newApprover
    );

    /// @notice Emitted when the owner changes pauser.
    /// @param oldPauser The address of old vault.
    /// @param newPauser The address of new vault.
    event PauserChanged(address indexed oldPauser, address indexed newPauser);

    /*//////////////////////////////////////////////////////////////
                                 ERRORS
    //////////////////////////////////////////////////////////////*/

    error InvalidAmount();
    error AlreadyClaimed();
    error InvalidMerkleProof();
    error InvalidToken();
    error InvalidMerkleRoot();
    error EmptyMerkleProof();
    error ClaimFinished();
    error ClaimNotFinished();
    error StakingNotEnabled();
    error WrongStakeAmount();
    error WrongClaimEnd();
    error Unauthorized();
    error WrongAddress();
    error ClaimWithProofNotEnabled();
    error InvalidProof();
    error OnlyRecipientCanStake();

    /*//////////////////////////////////////////////////////////////
                           CONSTANTS
    //////////////////////////////////////////////////////////////*/

    uint256 constant ACCOUNT_TYPE_ADDRESS = uint256(0x1);
    uint256 constant ACCOUNT_TYPE_BYTES32 = uint256(0x2);

    /*//////////////////////////////////////////////////////////////
                           IMMUTABLE STORAGE
    //////////////////////////////////////////////////////////////*/

    /// @notice The merkle root hash.
    bytes32 public immutable MERKLE_ROOT;

    /// @notice The token contract.
    IERC20 public immutable TOKEN;

    /// @notice The timestamp when the claim period ends.
    uint256 public immutable CLAIM_END;

    /*//////////////////////////////////////////////////////////////
                            PUBLIC STORAGE
    //////////////////////////////////////////////////////////////*/

    /// @notice The vault to deposit token for staking.
    IERC4626 public vault;

    /// @notice The the address of account with pauser right
    address public pauser;

    /// @notice Mapping of claimed status. The user is eligible to do no more than one claim.
    mapping(address user => bool claimed) public hasClaimed;

    /// @notice Mapping of claimed status. The user is eligible to do no more than one claim.
    mapping(bytes32 user => bool claimed) public hasClaimedByProof;

    /// @notice The address that acts as and approved for claiming tokens to arbitrary address.
    address public approver;

    /*//////////////////////////////////////////////////////////////
                                STORAGE
    //////////////////////////////////////////////////////////////*/

    /*//////////////////////////////////////////////////////////////
                              CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/

    /// @notice Define the merkle root, base signer, token and owner.
    /// @param _merkleRoot The merkle root hash.
    /// @param _token The token address.
    /// @param _owner The owner address.
    /// @param _claimEnd The timestamp when the claim period ends.
    /// @param _vault The address of the vault to be deposit destination in case of claim and stake.
    /// @param _approver The address that acts as and approved for claiming tokens to arbitrary address.
    constructor(
        bytes32 _merkleRoot,
        address _token,
        address _owner,
        uint256 _claimEnd,
        address _vault,
        address _pauser,
        address _approver
    ) Ownable(_owner) {
        if (_token == address(0)) revert InvalidToken();
        if (_merkleRoot == bytes32(0)) revert InvalidMerkleRoot();
        if (_claimEnd <= block.timestamp) revert WrongClaimEnd();
        if (_pauser == address(0)) revert WrongAddress();

        MERKLE_ROOT = _merkleRoot;
        TOKEN = IERC20(_token);
        CLAIM_END = _claimEnd;
        vault = IERC4626(_vault);
        pauser = _pauser;
        approver = _approver;
    }

    /// MODIFIER ///
    /**
     * PAUSE
     */
    modifier onlyPauser() {
        if (pauser != _msgSender()) {
            revert Unauthorized();
        }
        _;
    }

    /*//////////////////////////////////////////////////////////////
                           EXTERNAL FUNCTIONS
    //////////////////////////////////////////////////////////////*/

    /// ACCESS CONTROL FUNCTIONS ///

    function changePauser(address newPauser) external onlyOwner {
        if (newPauser == address(0)) {
            revert WrongAddress();
        }
        address oldPauser = pauser;
        pauser = newPauser;
        emit PauserChanged(oldPauser, newPauser);
    }

    /**
     * Pause deposit reporting and withdrawal validation.
     */
    function pause() external onlyPauser {
        _pause();
    }

    /**
     * Unpause deposit reporting and withdrawal validation.
     */
    function unpause() external onlyOwner {
        _unpause();
    }

    /// @notice Claim tokens using a merkle proof.
    /// @param _account The account to claim tokens for.
    /// @param _amount Amount of tokens to claim.
    /// @param _merkleProof Merkle proof of claim.
    function claim(
        address _account,
        uint256 _amount,
        bytes32[] calldata _merkleProof
    ) external whenNotPaused nonReentrant {
        _validateClaim(_account, _amount, _merkleProof);

        // Mark as claimed and send the tokens
        hasClaimed[_account] = true;
        TOKEN.safeTransfer(_account, _amount);

        emit Claimed(_account, _amount);
    }

    /// @notice Claim tokens using a merkle proof.
    /// @param _account The account to claim tokens for.
    /// @param _amount Amount of tokens to claim.
    /// @param _merkleProof Merkle proof of claim.
    /// @param _proof The proof (signature) that _account nomivated _dstAddress to receive tokens.
    function claimWithProof(
        bytes32 _account,
        uint256 _amount,
        address _dstAddress,
        bytes32[] calldata _merkleProof,
        bytes calldata _proof
    ) external whenNotPaused nonReentrant {
        _validateClaimWithProof(
            _account,
            _amount,
            _dstAddress,
            _merkleProof,
            _proof
        );

        // Mark as claimed and send the tokens
        hasClaimedByProof[_account] = true;
        TOKEN.safeTransfer(_dstAddress, _amount);

        emit ClaimedWithProof(_account, _amount, _dstAddress);
    }

    /// @notice Claim tokens using a merkle proof and stake them with predefined vault.
    /// @param _account The account to claim tokens for.
    /// @param _amount Amount of tokens to claim.
    /// @param _merkleProof Merkle proof of claim.
    function claimAndStake(
        address _account,
        uint256 _amount,
        bytes32[] calldata _merkleProof
    ) external whenNotPaused nonReentrant {
        _claimAndStake(_account, _amount, _merkleProof, _amount);
    }

    /// @notice Claim tokens using a merkle proof and stake part of them with predefined vault.
    /// @param _account The account to claim tokens for.
    /// @param _amount Amount of tokens to claim.
    /// @param _merkleProof Merkle proof of claim.
    /// @param _stakeAmount Amount to stake.
    function claimAndStake(
        address _account,
        uint256 _amount,
        bytes32[] calldata _merkleProof,
        uint256 _stakeAmount
    ) external whenNotPaused nonReentrant {
        _claimAndStake(_account, _amount, _merkleProof, _stakeAmount);
    }

    /// @notice Claim tokens to arbitrary address using a signature and merkle proof and stake part of
    ///         them with predefined vault.
    /// @param _account The account to claim tokens for.
    /// @param _amount Amount of tokens to claim.
    /// @param _merkleProof Merkle proof of claim.
    /// @param _stakeAmount Amount to stake.
    /// @param _proof The proof (signature) that _account nomivated _dstAddress to receive tokens.
    function claimAndStakeWithProof(
        bytes32 _account,
        uint256 _amount,
        address _dstAddress,
        bytes32[] calldata _merkleProof,
        uint256 _stakeAmount,
        bytes calldata _proof
    ) external whenNotPaused nonReentrant {
        _claimAndStakeWithProof(
            _account,
            _amount,
            _dstAddress,
            _merkleProof,
            _stakeAmount,
            _proof
        );
    }

    /// @notice Withdraw tokens from the contract.
    function withdraw() external onlyOwner {
        if (block.timestamp < CLAIM_END) revert ClaimNotFinished();

        uint256 balance = TOKEN.balanceOf(address(this));
        TOKEN.safeTransfer(msg.sender, balance);

        emit Withdrawn(msg.sender, balance);
    }

    /// @notice Change Vault to stake claimed tokens.
    function changeVault(address _newVault) external onlyOwner {
        address oldVault = address(vault);
        vault = IERC4626(_newVault);
        emit VaultChanged(oldVault, _newVault);
    }

    /// @notice Change Approver to claim on an arbitrary address
    function changeApprover(address _newApprover) external onlyOwner {
        address oldApprover = address(approver);
        approver = _newApprover;
        emit ApproverChanged(oldApprover, _newApprover);
    }

    /*//////////////////////////////////////////////////////////////
                           INTERNAL FUNCTIONS
    //////////////////////////////////////////////////////////////*/
    function _validateClaim(
        address _account,
        uint256 _amount,
        bytes32[] calldata _merkleProof
    ) internal view {
        if (_amount == 0) revert InvalidAmount();
        if (hasClaimed[_account]) revert AlreadyClaimed();
        if (_merkleProof.length == 0) revert EmptyMerkleProof();
        if (block.timestamp >= CLAIM_END) revert ClaimFinished();

        // Generate the leaf
        bytes32 leaf = keccak256(
            abi.encode(_account, _amount, ACCOUNT_TYPE_ADDRESS)
        );

        // Verify the merkle proof
        if (!MerkleProof.verify(_merkleProof, MERKLE_ROOT, leaf))
            revert InvalidMerkleProof();
    }

    function _validateClaimWithProof(
        bytes32 _account,
        uint256 _amount,
        address _dstAddress,
        bytes32[] calldata _merkleProof,
        bytes calldata proof
    ) internal view {
        if (_amount == 0) revert InvalidAmount();
        if (hasClaimedByProof[_account]) revert AlreadyClaimed();
        if (_merkleProof.length == 0) revert EmptyMerkleProof();
        if (block.timestamp >= CLAIM_END) revert ClaimFinished();
        if (approver == address(0)) revert ClaimWithProofNotEnabled();

        // Generate the leaf
        bytes32 leaf = keccak256(
            abi.encode(_account, _amount, ACCOUNT_TYPE_BYTES32)
        );

        // Verify the merkle proof
        if (!MerkleProof.verify(_merkleProof, MERKLE_ROOT, leaf))
            revert InvalidMerkleProof();

        // Verify proof provided by approver
        bytes32 data = keccak256(abi.encode(_account, _amount, _dstAddress));
        (address signer, ECDSA.RecoverError err, ) = ECDSA.tryRecover(
            data,
            proof
        );
        // ignore if bad signature
        if (err != ECDSA.RecoverError.NoError) {
            revert InvalidProof();
        }
        // if signer doesn't match consider data invalid
        if (signer != approver) {
            revert InvalidProof();
        }
    }

    function _claimAndStake(
        address _account,
        uint256 _amount,
        bytes32[] calldata _merkleProof,
        uint256 _stakeAmount
    ) internal {
        if (_msgSender() != _account) revert OnlyRecipientCanStake();
        if (address(vault) == address(0)) revert StakingNotEnabled();
        if (_amount < _stakeAmount) revert WrongStakeAmount();
        _validateClaim(_account, _amount, _merkleProof);

        // Mark as claimed and send the tokens
        hasClaimed[_account] = true;
        if (_amount > _stakeAmount) {
            TOKEN.safeTransfer(_account, _amount - _stakeAmount);
        }
        if (_stakeAmount > 0) {
            TOKEN.safeIncreaseAllowance(address(vault), _stakeAmount);
            vault.deposit(_stakeAmount, _account);
        }

        emit Claimed(_account, _amount);
    }

    function _claimAndStakeWithProof(
        bytes32 _account,
        uint256 _amount,
        address _dstAddress,
        bytes32[] calldata _merkleProof,
        uint256 _stakeAmount,
        bytes calldata _proof
    ) internal {
        if (_msgSender() != _dstAddress) revert OnlyRecipientCanStake();
        if (address(vault) == address(0)) revert StakingNotEnabled();
        if (_amount < _stakeAmount) revert WrongStakeAmount();
        _validateClaimWithProof(
            _account,
            _amount,
            _dstAddress,
            _merkleProof,
            _proof
        );

        // Mark as claimed and send the tokens
        hasClaimedByProof[_account] = true;
        if (_amount > _stakeAmount) {
            TOKEN.safeTransfer(_dstAddress, _amount - _stakeAmount);
        }
        if (_stakeAmount > 0) {
            TOKEN.safeIncreaseAllowance(address(vault), _stakeAmount);
            vault.deposit(_stakeAmount, _dstAddress);
        }

        emit ClaimedWithProof(_account, _amount, _dstAddress);
    }
}

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

pragma solidity ^0.8.20;

import {Context} from "../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.
 *
 * The initial owner is set to the address provided by the deployer. 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;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

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

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @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 {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable2Step.sol)

pragma solidity ^0.8.20;

import {Ownable} from "./Ownable.sol";

/**
 * @dev Contract module which provides access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * The initial owner is specified at deployment time in the constructor for `Ownable`. This
 * can later be changed with {transferOwnership} and {acceptOwnership}.
 *
 * This module is used through inheritance. It will make available all functions
 * from parent (Ownable).
 */
abstract contract Ownable2Step is Ownable {
    address private _pendingOwner;

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

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

    /**
     * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual override onlyOwner {
        _pendingOwner = newOwner;
        emit OwnershipTransferStarted(owner(), newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual override {
        delete _pendingOwner;
        super._transferOwnership(newOwner);
    }

    /**
     * @dev The new owner accepts the ownership transfer.
     */
    function acceptOwnership() public virtual {
        address sender = _msgSender();
        if (pendingOwner() != sender) {
            revert OwnableUnauthorizedAccount(sender);
        }
        _transferOwnership(sender);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC4626.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../token/ERC20/IERC20.sol";
import {IERC20Metadata} from "../token/ERC20/extensions/IERC20Metadata.sol";

/**
 * @dev Interface of the ERC4626 "Tokenized Vault Standard", as defined in
 * https://eips.ethereum.org/EIPS/eip-4626[ERC-4626].
 */
interface IERC4626 is IERC20, IERC20Metadata {
    event Deposit(address indexed sender, address indexed owner, uint256 assets, uint256 shares);

    event Withdraw(
        address indexed sender,
        address indexed receiver,
        address indexed owner,
        uint256 assets,
        uint256 shares
    );

    /**
     * @dev Returns the address of the underlying token used for the Vault for accounting, depositing, and withdrawing.
     *
     * - MUST be an ERC-20 token contract.
     * - MUST NOT revert.
     */
    function asset() external view returns (address assetTokenAddress);

    /**
     * @dev Returns the total amount of the underlying asset that is “managed” by Vault.
     *
     * - SHOULD include any compounding that occurs from yield.
     * - MUST be inclusive of any fees that are charged against assets in the Vault.
     * - MUST NOT revert.
     */
    function totalAssets() external view returns (uint256 totalManagedAssets);

    /**
     * @dev Returns the amount of shares that the Vault would exchange for the amount of assets provided, in an ideal
     * scenario where all the conditions are met.
     *
     * - MUST NOT be inclusive of any fees that are charged against assets in the Vault.
     * - MUST NOT show any variations depending on the caller.
     * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.
     * - MUST NOT revert.
     *
     * NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the
     * “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and
     * from.
     */
    function convertToShares(uint256 assets) external view returns (uint256 shares);

    /**
     * @dev Returns the amount of assets that the Vault would exchange for the amount of shares provided, in an ideal
     * scenario where all the conditions are met.
     *
     * - MUST NOT be inclusive of any fees that are charged against assets in the Vault.
     * - MUST NOT show any variations depending on the caller.
     * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.
     * - MUST NOT revert.
     *
     * NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the
     * “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and
     * from.
     */
    function convertToAssets(uint256 shares) external view returns (uint256 assets);

    /**
     * @dev Returns the maximum amount of the underlying asset that can be deposited into the Vault for the receiver,
     * through a deposit call.
     *
     * - MUST return a limited value if receiver is subject to some deposit limit.
     * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of assets that may be deposited.
     * - MUST NOT revert.
     */
    function maxDeposit(address receiver) external view returns (uint256 maxAssets);

    /**
     * @dev Allows an on-chain or off-chain user to simulate the effects of their deposit at the current block, given
     * current on-chain conditions.
     *
     * - MUST return as close to and no more than the exact amount of Vault shares that would be minted in a deposit
     *   call in the same transaction. I.e. deposit should return the same or more shares as previewDeposit if called
     *   in the same transaction.
     * - MUST NOT account for deposit limits like those returned from maxDeposit and should always act as though the
     *   deposit would be accepted, regardless if the user has enough tokens approved, etc.
     * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.
     * - MUST NOT revert.
     *
     * NOTE: any unfavorable discrepancy between convertToShares and previewDeposit SHOULD be considered slippage in
     * share price or some other type of condition, meaning the depositor will lose assets by depositing.
     */
    function previewDeposit(uint256 assets) external view returns (uint256 shares);

    /**
     * @dev Mints shares Vault shares to receiver by depositing exactly amount of underlying tokens.
     *
     * - MUST emit the Deposit event.
     * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
     *   deposit execution, and are accounted for during deposit.
     * - MUST revert if all of assets cannot be deposited (due to deposit limit being reached, slippage, the user not
     *   approving enough underlying tokens to the Vault contract, etc).
     *
     * NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token.
     */
    function deposit(uint256 assets, address receiver) external returns (uint256 shares);

    /**
     * @dev Returns the maximum amount of the Vault shares that can be minted for the receiver, through a mint call.
     * - MUST return a limited value if receiver is subject to some mint limit.
     * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of shares that may be minted.
     * - MUST NOT revert.
     */
    function maxMint(address receiver) external view returns (uint256 maxShares);

    /**
     * @dev Allows an on-chain or off-chain user to simulate the effects of their mint at the current block, given
     * current on-chain conditions.
     *
     * - MUST return as close to and no fewer than the exact amount of assets that would be deposited in a mint call
     *   in the same transaction. I.e. mint should return the same or fewer assets as previewMint if called in the
     *   same transaction.
     * - MUST NOT account for mint limits like those returned from maxMint and should always act as though the mint
     *   would be accepted, regardless if the user has enough tokens approved, etc.
     * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.
     * - MUST NOT revert.
     *
     * NOTE: any unfavorable discrepancy between convertToAssets and previewMint SHOULD be considered slippage in
     * share price or some other type of condition, meaning the depositor will lose assets by minting.
     */
    function previewMint(uint256 shares) external view returns (uint256 assets);

    /**
     * @dev Mints exactly shares Vault shares to receiver by depositing amount of underlying tokens.
     *
     * - MUST emit the Deposit event.
     * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the mint
     *   execution, and are accounted for during mint.
     * - MUST revert if all of shares cannot be minted (due to deposit limit being reached, slippage, the user not
     *   approving enough underlying tokens to the Vault contract, etc).
     *
     * NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token.
     */
    function mint(uint256 shares, address receiver) external returns (uint256 assets);

    /**
     * @dev Returns the maximum amount of the underlying asset that can be withdrawn from the owner balance in the
     * Vault, through a withdraw call.
     *
     * - MUST return a limited value if owner is subject to some withdrawal limit or timelock.
     * - MUST NOT revert.
     */
    function maxWithdraw(address owner) external view returns (uint256 maxAssets);

    /**
     * @dev Allows an on-chain or off-chain user to simulate the effects of their withdrawal at the current block,
     * given current on-chain conditions.
     *
     * - MUST return as close to and no fewer than the exact amount of Vault shares that would be burned in a withdraw
     *   call in the same transaction. I.e. withdraw should return the same or fewer shares as previewWithdraw if
     *   called
     *   in the same transaction.
     * - MUST NOT account for withdrawal limits like those returned from maxWithdraw and should always act as though
     *   the withdrawal would be accepted, regardless if the user has enough shares, etc.
     * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.
     * - MUST NOT revert.
     *
     * NOTE: any unfavorable discrepancy between convertToShares and previewWithdraw SHOULD be considered slippage in
     * share price or some other type of condition, meaning the depositor will lose assets by depositing.
     */
    function previewWithdraw(uint256 assets) external view returns (uint256 shares);

    /**
     * @dev Burns shares from owner and sends exactly assets of underlying tokens to receiver.
     *
     * - MUST emit the Withdraw event.
     * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
     *   withdraw execution, and are accounted for during withdraw.
     * - MUST revert if all of assets cannot be withdrawn (due to withdrawal limit being reached, slippage, the owner
     *   not having enough shares, etc).
     *
     * Note that some implementations will require pre-requesting to the Vault before a withdrawal may be performed.
     * Those methods should be performed separately.
     */
    function withdraw(uint256 assets, address receiver, address owner) external returns (uint256 shares);

    /**
     * @dev Returns the maximum amount of Vault shares that can be redeemed from the owner balance in the Vault,
     * through a redeem call.
     *
     * - MUST return a limited value if owner is subject to some withdrawal limit or timelock.
     * - MUST return balanceOf(owner) if owner is not subject to any withdrawal limit or timelock.
     * - MUST NOT revert.
     */
    function maxRedeem(address owner) external view returns (uint256 maxShares);

    /**
     * @dev Allows an on-chain or off-chain user to simulate the effects of their redeemption at the current block,
     * given current on-chain conditions.
     *
     * - MUST return as close to and no more than the exact amount of assets that would be withdrawn in a redeem call
     *   in the same transaction. I.e. redeem should return the same or more assets as previewRedeem if called in the
     *   same transaction.
     * - MUST NOT account for redemption limits like those returned from maxRedeem and should always act as though the
     *   redemption would be accepted, regardless if the user has enough shares, etc.
     * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.
     * - MUST NOT revert.
     *
     * NOTE: any unfavorable discrepancy between convertToAssets and previewRedeem SHOULD be considered slippage in
     * share price or some other type of condition, meaning the depositor will lose assets by redeeming.
     */
    function previewRedeem(uint256 shares) external view returns (uint256 assets);

    /**
     * @dev Burns exactly shares from owner and sends assets of underlying tokens to receiver.
     *
     * - MUST emit the Withdraw event.
     * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
     *   redeem execution, and are accounted for during redeem.
     * - MUST revert if all of shares cannot be redeemed (due to withdrawal limit being reached, slippage, the owner
     *   not having enough shares, etc).
     *
     * NOTE: some implementations will require pre-requesting to the Vault before a withdrawal may be performed.
     * Those methods should be performed separately.
     */
    function redeem(uint256 shares, address receiver, address owner) external returns (uint256 assets);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

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

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 *
 * ==== Security Considerations
 *
 * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
 * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
 * considered as an intention to spend the allowance in any specific way. The second is that because permits have
 * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
 * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
 * generally recommended is:
 *
 * ```solidity
 * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
 *     try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
 *     doThing(..., value);
 * }
 *
 * function doThing(..., uint256 value) public {
 *     token.safeTransferFrom(msg.sender, address(this), value);
 *     ...
 * }
 * ```
 *
 * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
 * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
 * {SafeERC20-safeTransferFrom}).
 *
 * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
 * contracts should have entry points that don't rely on permit.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     *
     * CAUTION: See Security Considerations above.
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

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

pragma solidity ^0.8.20;

/**
 * @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 value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

    /**
     * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` 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 value) external returns (bool);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";
import {IERC20Permit} from "../extensions/IERC20Permit.sol";
import {Address} from "../../../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;

    /**
     * @dev An operation with an ERC20 token failed.
     */
    error SafeERC20FailedOperation(address token);

    /**
     * @dev Indicates a failed `decreaseAllowance` request.
     */
    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        forceApprove(token, spender, oldAllowance + value);
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
     * value, non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
        unchecked {
            uint256 currentAllowance = token.allowance(address(this), spender);
            if (currentAllowance < requestedDecrease) {
                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
            }
            forceApprove(token, spender, currentAllowance - requestedDecrease);
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @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);
        if (returndata.length != 0 && !abi.decode(returndata, (bool))) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @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).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // 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 cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

        (bool success, bytes memory returndata) = address(token).call(data);
        return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)

pragma solidity ^0.8.20;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev The ETH balance of the account is not enough to perform the operation.
     */
    error AddressInsufficientBalance(address account);

    /**
     * @dev There's no code at `target` (it is not a contract).
     */
    error AddressEmptyCode(address target);

    /**
     * @dev A call to an address target failed. The target may have reverted.
     */
    error FailedInnerCall();

    /**
     * @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://consensys.net/diligence/blog/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.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        if (address(this).balance < amount) {
            revert AddressInsufficientBalance(address(this));
        }

        (bool success, ) = recipient.call{value: amount}("");
        if (!success) {
            revert FailedInnerCall();
        }
    }

    /**
     * @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 or custom error, it is bubbled
     * up by this function (like regular Solidity function calls). However, if
     * the call reverted with no returned reason, this function reverts with a
     * {FailedInnerCall} error.
     *
     * 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.
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0);
    }

    /**
     * @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`.
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        if (address(this).balance < value) {
            revert AddressInsufficientBalance(address(this));
        }
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
     * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
     * unsuccessful call.
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata
    ) internal view returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            // only check if target is a contract if the call was successful and the return data is empty
            // otherwise we already know that it was a contract
            if (returndata.length == 0 && target.code.length == 0) {
                revert AddressEmptyCode(target);
            }
            return returndata;
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
     * revert reason or with a default {FailedInnerCall} error.
     */
    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            return returndata;
        }
    }

    /**
     * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
     */
    function _revert(bytes memory returndata) private pure {
        // 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
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert FailedInnerCall();
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

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

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.20;

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS
    }

    /**
     * @dev The signature derives the `address(0)`.
     */
    error ECDSAInvalidSignature();

    /**
     * @dev The signature has an invalid length.
     */
    error ECDSAInvalidSignatureLength(uint256 length);

    /**
     * @dev The signature has an S value that is in the upper half order.
     */
    error ECDSAInvalidSignatureS(bytes32 s);

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not
     * return address(0) without also returning an error description. Errors are documented using an enum (error type)
     * and a bytes32 providing additional information about the error.
     *
     * If no error is returned, then the address can be used for verification purposes.
     *
     * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            /// @solidity memory-safe-assembly
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length));
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);
        _throwError(error, errorArg);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     */
    function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {
        unchecked {
            bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
            // We do not check for an overflow here since the shift operation results in 0 or 1.
            uint8 v = uint8((uint256(vs) >> 255) + 27);
            return tryRecover(hash, v, r, s);
        }
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     */
    function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {
        (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);
        _throwError(error, errorArg);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError, bytes32) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS, s);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature, bytes32(0));
        }

        return (signer, RecoverError.NoError, bytes32(0));
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
        (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s);
        _throwError(error, errorArg);
        return recovered;
    }

    /**
     * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.
     */
    function _throwError(RecoverError error, bytes32 errorArg) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert ECDSAInvalidSignature();
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert ECDSAInvalidSignatureLength(uint256(errorArg));
        } else if (error == RecoverError.InvalidSignatureS) {
            revert ECDSAInvalidSignatureS(errorArg);
        }
    }
}

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

pragma solidity ^0.8.20;

/**
 * @dev These functions deal with verification of Merkle Tree proofs.
 *
 * The tree and the proofs can be generated using our
 * https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
 * You will find a quickstart guide in the readme.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the Merkle tree could be reinterpreted as a leaf value.
 * OpenZeppelin's JavaScript library generates Merkle trees that are safe
 * against this attack out of the box.
 */
library MerkleProof {
    /**
     *@dev The multiproof provided is not valid.
     */
    error MerkleProofInvalidMultiproof();

    /**
     * @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}
     */
    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.
     */
    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}
     */
    function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

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

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

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

        // Check proof validity.
        if (leavesLen + proofLen != totalHashes + 1) {
            revert MerkleProofInvalidMultiproof();
        }

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

        if (totalHashes > 0) {
            if (proofPos != proofLen) {
                revert MerkleProofInvalidMultiproof();
            }
            unchecked {
                return hashes[totalHashes - 1];
            }
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

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

        // Check proof validity.
        if (leavesLen + proofLen != totalHashes + 1) {
            revert MerkleProofInvalidMultiproof();
        }

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

        if (totalHashes > 0) {
            if (proofPos != proofLen) {
                revert MerkleProofInvalidMultiproof();
            }
            unchecked {
                return hashes[totalHashes - 1];
            }
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Sorts the pair (a, b) and hashes the result.
     */
    function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
        return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
    }

    /**
     * @dev Implementation of keccak256(abi.encode(a, b)) that doesn't allocate or expand memory.
     */
    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol)

pragma solidity ^0.8.20;

import {Context} from "../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 {
    bool private _paused;

    /**
     * @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);

    /**
     * @dev The operation failed because the contract is paused.
     */
    error EnforcedPause();

    /**
     * @dev The operation failed because the contract is not paused.
     */
    error ExpectedPause();

    /**
     * @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 {
        if (paused()) {
            revert EnforcedPause();
        }
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        if (!paused()) {
            revert ExpectedPause();
        }
    }

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)

pragma solidity ^0.8.20;

/**
 * @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;

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

    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() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be NOT_ENTERED
        if (_status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

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

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

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == ENTERED;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "evmVersion": "paris",
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  }
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_claimEnd","type":"uint256"},{"internalType":"address","name":"_vault","type":"address"},{"internalType":"address","name":"_pauser","type":"address"},{"internalType":"address","name":"_approver","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[],"name":"AlreadyClaimed","type":"error"},{"inputs":[],"name":"ClaimFinished","type":"error"},{"inputs":[],"name":"ClaimNotFinished","type":"error"},{"inputs":[],"name":"ClaimWithProofNotEnabled","type":"error"},{"inputs":[],"name":"EmptyMerkleProof","type":"error"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[],"name":"InvalidAmount","type":"error"},{"inputs":[],"name":"InvalidMerkleProof","type":"error"},{"inputs":[],"name":"InvalidMerkleRoot","type":"error"},{"inputs":[],"name":"InvalidProof","type":"error"},{"inputs":[],"name":"InvalidToken","type":"error"},{"inputs":[],"name":"OnlyRecipientCanStake","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[],"name":"StakingNotEnabled","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"inputs":[],"name":"WrongAddress","type":"error"},{"inputs":[],"name":"WrongClaimEnd","type":"error"},{"inputs":[],"name":"WrongStakeAmount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldApprover","type":"address"},{"indexed":true,"internalType":"address","name":"newApprover","type":"address"}],"name":"ApproverChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"user","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"address","name":"dstAddress","type":"address"}],"name":"ClaimedWithProof","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldPauser","type":"address"},{"indexed":true,"internalType":"address","name":"newPauser","type":"address"}],"name":"PauserChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldVault","type":"address"},{"indexed":true,"internalType":"address","name":"newVault","type":"address"}],"name":"VaultChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[],"name":"CLAIM_END","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MERKLE_ROOT","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOKEN","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"approver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_newApprover","type":"address"}],"name":"changeApprover","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newPauser","type":"address"}],"name":"changePauser","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newVault","type":"address"}],"name":"changeVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"claimAndStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"},{"internalType":"uint256","name":"_stakeAmount","type":"uint256"}],"name":"claimAndStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_account","type":"bytes32"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_dstAddress","type":"address"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"},{"internalType":"uint256","name":"_stakeAmount","type":"uint256"},{"internalType":"bytes","name":"_proof","type":"bytes"}],"name":"claimAndStakeWithProof","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_account","type":"bytes32"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_dstAddress","type":"address"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"},{"internalType":"bytes","name":"_proof","type":"bytes"}],"name":"claimWithProof","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"hasClaimed","outputs":[{"internalType":"bool","name":"claimed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"user","type":"bytes32"}],"name":"hasClaimedByProof","outputs":[{"internalType":"bool","name":"claimed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pauser","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"contract IERC4626","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

0x60e060405234801561001057600080fd5b50604051611ea3380380611ea383398101604081905261002f916101e3565b846001600160a01b03811661005e57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6100678161015b565b506001805460ff60a01b191681556002556001600160a01b03861661009f5760405163c1ab6dc160e01b815260040160405180910390fd5b866100bd57604051639dd854d360e01b815260040160405180910390fd5b4284116100dd576040516339476f0160e01b815260040160405180910390fd5b6001600160a01b03821661010457604051630d23cf4160e11b815260040160405180910390fd5b6080969096526001600160a01b0394851660a05260c092909252600380549185166001600160a01b03199283161790556004805492851692821692909217909155600780549490931693169290921790555061025b565b600180546001600160a01b031916905561017481610177565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146101de57600080fd5b919050565b600080600080600080600060e0888a0312156101fe57600080fd5b8751965061020e602089016101c7565b955061021c604089016101c7565b945060608801519350610231608089016101c7565b925061023f60a089016101c7565b915061024d60c089016101c7565b905092959891949750929550565b60805160a05160c051611bc56102de600039600081816102710152818161052d01528181610bee0152610f0c0152600081816102cb015281816104250152818161058401528181610606015281816106ab01528181610a4c01528181610a8a015261118501526000818161020b01528181610cc00152610fbd0152611bc56000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c806373b2e80e116100de5780639fd0506d11610097578063c6c599c111610071578063c6c599c114610362578063e30c397814610375578063f2fde38b14610386578063fbfa77cf1461039957600080fd5b80639fd0506d14610329578063a2d7d1cb1461033c578063aa5a6d811461034f57600080fd5b806373b2e80e1461029b57806379ba5097146102be57806382bfefc8146102c65780638456cb59146102ed5780638da5cb5b146102f557806393e8d5051461030657600080fd5b80633f4ba83a116101305780633f4ba83a146101fe57806351e75e8b146102065780635c975abb1461023b57806360e232a914610259578063701815c51461026c578063715018a61461029357600080fd5b8063050f963614610178578063141a8dd81461018d5780632770e16e146101bd5780632cd271e7146101d05780633ccfd60b146101e35780633d13f874146101eb575b600080fd5b61018b610186366004611892565b6103ac565b005b6007546101a0906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b61018b6101cb366004611934565b6103e0565b61018b6101de3660046119cd565b6104a2565b61018b610523565b61018b6101f93660046119e8565b610665565b61018b610725565b61022d7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016101b4565b600154600160a01b900460ff165b60405190151581526020016101b4565b61018b6102673660046119cd565b610737565b61022d7f000000000000000000000000000000000000000000000000000000000000000081565b61018b610791565b6102496102a93660046119cd565b60056020526000908152604090205460ff1681565b61018b6107a3565b6101a07f000000000000000000000000000000000000000000000000000000000000000081565b61018b6107ec565b6000546001600160a01b03166101a0565b610249610314366004611a42565b60066020526000908152604090205460ff1681565b6004546101a0906001600160a01b031681565b61018b61034a3660046119e8565b61081e565b61018b61035d366004611a5b565b610845565b61018b6103703660046119cd565b610873565b6001546001600160a01b03166101a0565b61018b6103943660046119cd565b6108cd565b6003546101a0906001600160a01b031681565b6103b461093e565b6103bc610969565b6103cc8888888888888888610991565b6103d66001600255565b5050505050505050565b6103e861093e565b6103f0610969565b6103ff87878787878787610b79565b6000878152600660205260409020805460ff1916600117905561044c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168688610dfc565b604080518781526001600160a01b038716602082015288917fabe34689ccaf0ac741fd6709e7edb1cc84889f07cff1b6649d8d2e933a932a99910160405180910390a26104996001600255565b50505050505050565b6104aa610e60565b6001600160a01b0381166104d157604051630d23cf4160e11b815260040160405180910390fd5b600480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f95bb211a5a393c4d30c3edc9a745825fba4e6ad3e3bb949e6bf8ccdfe431a81190600090a35050565b61052b610e60565b7f000000000000000000000000000000000000000000000000000000000000000042101561056c57604051634efa54af60e11b815260040160405180910390fd5b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156105d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f79190611abd565b905061062d6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163383610dfc565b60405181815233907f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d59060200160405180910390a250565b61066d61093e565b610675610969565b61068184848484610e8d565b6001600160a01b038085166000908152600560205260409020805460ff191660011790556106d2907f0000000000000000000000000000000000000000000000000000000000000000168585610dfc565b836001600160a01b03167fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a8460405161070d91815260200190565b60405180910390a261071f6001600255565b50505050565b61072d610e60565b610735611005565b565b61073f610e60565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f16e2accad9173abff57b295b56993ec5d86b3cbf791fea02f02a6616463754ea90600090a35050565b610799610e60565b610735600061105a565b60015433906001600160a01b031681146107e05760405163118cdaa760e01b81526001600160a01b03821660048201526024015b60405180910390fd5b6107e98161105a565b50565b6004546001600160a01b03163314610816576040516282b42960e81b815260040160405180910390fd5b610735611073565b61082661093e565b61082e610969565b61083b84848484876110b6565b61071f6001600255565b61084d61093e565b610855610969565b61086285858585856110b6565b61086c6001600255565b5050505050565b61087b610e60565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907fa53935b08c042831464f1b811e652d37e0db7f6b818e8bc174097b18e09cf9ae90600090a35050565b6108d5610e60565b600180546001600160a01b0383166001600160a01b031990911681179091556109066000546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b600154600160a01b900460ff16156107355760405163d93c066560e01b815260040160405180910390fd5b600280540361098b57604051633ee5aeb560e01b815260040160405180910390fd5b60028055565b336001600160a01b038716146109ba5760405163d2a3c74160e01b815260040160405180910390fd5b6003546001600160a01b03166109e35760405163a3df9bcf60e01b815260040160405180910390fd5b82871015610a045760405163356a807560e21b815260040160405180910390fd5b610a1388888888888787610b79565b6000888152600660205260409020805460ff1916600117905582871115610a7357610a7386610a42858a611aec565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169190610dfc565b8215610b2c57600354610ab3906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911685611271565b600354604051636e553f6560e01b8152600481018590526001600160a01b03888116602483015290911690636e553f65906044016020604051808303816000875af1158015610b06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2a9190611abd565b505b604080518881526001600160a01b038816602082015289917fabe34689ccaf0ac741fd6709e7edb1cc84889f07cff1b6649d8d2e933a932a99910160405180910390a25050505050505050565b85600003610b9a5760405163162908e360e11b815260040160405180910390fd5b60008781526006602052604090205460ff1615610bca57604051630c8d9eab60e31b815260040160405180910390fd5b6000839003610bec576040516383274ce960e01b815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000004210610c2c576040516323e2447f60e11b815260040160405180910390fd5b6007546001600160a01b0316610c5557604051630e4c084b60e41b815260040160405180910390fd5b604080516020810189905290810187905260026060820152600090608001604051602081830303815290604052805190602001209050610ceb8585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152507f000000000000000000000000000000000000000000000000000000000000000092508591506112fb9050565b610d085760405163582f497d60e11b815260040160405180910390fd5b60408051602081018a90529081018890526001600160a01b0387166060820152600090608001604051602081830303815290604052805190602001209050600080610d898387878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061131392505050565b5090925090506000816003811115610da357610da3611aff565b14610dc1576040516309bde33960e01b815260040160405180910390fd5b6007546001600160a01b03838116911614610def576040516309bde33960e01b815260040160405180910390fd5b5050505050505050505050565b6040516001600160a01b03838116602483015260448201839052610e5b91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050611360565b505050565b6000546001600160a01b031633146107355760405163118cdaa760e01b81523360048201526024016107d7565b82600003610eae5760405163162908e360e11b815260040160405180910390fd5b6001600160a01b03841660009081526005602052604090205460ff1615610ee857604051630c8d9eab60e31b815260040160405180910390fd5b6000819003610f0a576040516383274ce960e01b815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000004210610f4a576040516323e2447f60e11b815260040160405180910390fd5b604080516001600160a01b038616602082015290810184905260016060820152600090608001604051602081830303815290604052805190602001209050610fe88383808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152507f000000000000000000000000000000000000000000000000000000000000000092508591506112fb9050565b61086c5760405163582f497d60e11b815260040160405180910390fd5b61100d6113c3565b6001805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600180546001600160a01b03191690556107e9816113ed565b61107b61093e565b6001805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861103d3390565b336001600160a01b038616146110df5760405163d2a3c74160e01b815260040160405180910390fd5b6003546001600160a01b03166111085760405163a3df9bcf60e01b815260040160405180910390fd5b808410156111295760405163356a807560e21b815260040160405180910390fd5b61113585858585610e8d565b6001600160a01b0385166000908152600560205260409020805460ff191660011790558084111561116e5761116e85610a428387611aec565b8015611227576003546111ae906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683611271565b600354604051636e553f6560e01b8152600481018390526001600160a01b03878116602483015290911690636e553f65906044016020604051808303816000875af1158015611201573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112259190611abd565b505b846001600160a01b03167fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a8560405161126291815260200190565b60405180910390a25050505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301526000919085169063dd62ed3e90604401602060405180830381865afa1580156112c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112e59190611abd565b905061071f84846112f68585611b15565b61143d565b60008261130885846114cd565b1490505b9392505050565b6000806000835160410361134d5760208401516040850151606086015160001a61133f88828585611512565b955095509550505050611359565b50508151600091506002905b9250925092565b60006113756001600160a01b038416836115e1565b9050805160001415801561139a5750808060200190518101906113989190611b28565b155b15610e5b57604051635274afe760e01b81526001600160a01b03841660048201526024016107d7565b600154600160a01b900460ff1661073557604051638dfc202b60e01b815260040160405180910390fd5b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b17905261148e84826115ef565b61071f576040516001600160a01b038481166024830152600060448301526114c391869182169063095ea7b390606401610e29565b61071f8482611360565b600081815b8451811015611508576114fe828683815181106114f1576114f1611b4a565b6020026020010151611697565b91506001016114d2565b5090505b92915050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a084111561154d57506000915060039050826115d7565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa1580156115a1573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166115cd575060009250600191508290506115d7565b9250600091508190505b9450945094915050565b606061130c838360006116c6565b6000806000846001600160a01b03168460405161160c9190611b60565b6000604051808303816000865af19150503d8060008114611649576040519150601f19603f3d011682016040523d82523d6000602084013e61164e565b606091505b50915091508180156116785750805115806116785750808060200190518101906116789190611b28565b801561168e57506000856001600160a01b03163b115b95945050505050565b60008183106116b357600082815260208490526040902061130c565b600083815260208390526040902061130c565b6060814710156116eb5760405163cd78605960e01b81523060048201526024016107d7565b600080856001600160a01b031684866040516117079190611b60565b60006040518083038185875af1925050503d8060008114611744576040519150601f19603f3d011682016040523d82523d6000602084013e611749565b606091505b5091509150611759868383611763565b9695505050505050565b60608261177857611773826117bf565b61130c565b815115801561178f57506001600160a01b0384163b155b156117b857604051639996b31560e01b81526001600160a01b03851660048201526024016107d7565b508061130c565b8051156117cf5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b80356001600160a01b03811681146117ff57600080fd5b919050565b60008083601f84011261181657600080fd5b50813567ffffffffffffffff81111561182e57600080fd5b6020830191508360208260051b850101111561184957600080fd5b9250929050565b60008083601f84011261186257600080fd5b50813567ffffffffffffffff81111561187a57600080fd5b60208301915083602082850101111561184957600080fd5b60008060008060008060008060c0898b0312156118ae57600080fd5b88359750602089013596506118c560408a016117e8565b9550606089013567ffffffffffffffff8111156118e157600080fd5b6118ed8b828c01611804565b9096509450506080890135925060a089013567ffffffffffffffff81111561191457600080fd5b6119208b828c01611850565b999c989b5096995094979396929594505050565b600080600080600080600060a0888a03121561194f57600080fd5b8735965060208801359550611966604089016117e8565b9450606088013567ffffffffffffffff81111561198257600080fd5b61198e8a828b01611804565b909550935050608088013567ffffffffffffffff8111156119ae57600080fd5b6119ba8a828b01611850565b989b979a50959850939692959293505050565b6000602082840312156119df57600080fd5b61130c826117e8565b600080600080606085870312156119fe57600080fd5b611a07856117e8565b935060208501359250604085013567ffffffffffffffff811115611a2a57600080fd5b611a3687828801611804565b95989497509550505050565b600060208284031215611a5457600080fd5b5035919050565b600080600080600060808688031215611a7357600080fd5b611a7c866117e8565b945060208601359350604086013567ffffffffffffffff811115611a9f57600080fd5b611aab88828901611804565b96999598509660600135949350505050565b600060208284031215611acf57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561150c5761150c611ad6565b634e487b7160e01b600052602160045260246000fd5b8082018082111561150c5761150c611ad6565b600060208284031215611b3a57600080fd5b8151801515811461130c57600080fd5b634e487b7160e01b600052603260045260246000fd5b6000825160005b81811015611b815760208186018101518583015201611b67565b50600092019182525091905056fea2646970667358221220c25e7794d626a2a02345fc10ca1465f3f55bdaba9a4c287acce186a85fb669eb64736f6c634300081c0033c580bba0c2a45f805231600597d6a361aab3d36dad9ac1bc1f8e5869e72fb95c000000000000000000000000f0db65d17e30a966c2ae6a21f6bba71cea6e9754000000000000000000000000629692bbca65a94deebd98de93bd74531561140d00000000000000000000000000000000000000000000000000000000694344000000000000000000000000004b266366dc8ff4c0007943a679cba1fdb845f98d000000000000000000000000629692bbca65a94deebd98de93bd74531561140d0000000000000000000000008100e84f270b3500e95b9b2bd07022dd5ee0b79a

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101735760003560e01c806373b2e80e116100de5780639fd0506d11610097578063c6c599c111610071578063c6c599c114610362578063e30c397814610375578063f2fde38b14610386578063fbfa77cf1461039957600080fd5b80639fd0506d14610329578063a2d7d1cb1461033c578063aa5a6d811461034f57600080fd5b806373b2e80e1461029b57806379ba5097146102be57806382bfefc8146102c65780638456cb59146102ed5780638da5cb5b146102f557806393e8d5051461030657600080fd5b80633f4ba83a116101305780633f4ba83a146101fe57806351e75e8b146102065780635c975abb1461023b57806360e232a914610259578063701815c51461026c578063715018a61461029357600080fd5b8063050f963614610178578063141a8dd81461018d5780632770e16e146101bd5780632cd271e7146101d05780633ccfd60b146101e35780633d13f874146101eb575b600080fd5b61018b610186366004611892565b6103ac565b005b6007546101a0906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b61018b6101cb366004611934565b6103e0565b61018b6101de3660046119cd565b6104a2565b61018b610523565b61018b6101f93660046119e8565b610665565b61018b610725565b61022d7fc580bba0c2a45f805231600597d6a361aab3d36dad9ac1bc1f8e5869e72fb95c81565b6040519081526020016101b4565b600154600160a01b900460ff165b60405190151581526020016101b4565b61018b6102673660046119cd565b610737565b61022d7f000000000000000000000000000000000000000000000000000000006943440081565b61018b610791565b6102496102a93660046119cd565b60056020526000908152604090205460ff1681565b61018b6107a3565b6101a07f000000000000000000000000f0db65d17e30a966c2ae6a21f6bba71cea6e975481565b61018b6107ec565b6000546001600160a01b03166101a0565b610249610314366004611a42565b60066020526000908152604090205460ff1681565b6004546101a0906001600160a01b031681565b61018b61034a3660046119e8565b61081e565b61018b61035d366004611a5b565b610845565b61018b6103703660046119cd565b610873565b6001546001600160a01b03166101a0565b61018b6103943660046119cd565b6108cd565b6003546101a0906001600160a01b031681565b6103b461093e565b6103bc610969565b6103cc8888888888888888610991565b6103d66001600255565b5050505050505050565b6103e861093e565b6103f0610969565b6103ff87878787878787610b79565b6000878152600660205260409020805460ff1916600117905561044c6001600160a01b037f000000000000000000000000f0db65d17e30a966c2ae6a21f6bba71cea6e9754168688610dfc565b604080518781526001600160a01b038716602082015288917fabe34689ccaf0ac741fd6709e7edb1cc84889f07cff1b6649d8d2e933a932a99910160405180910390a26104996001600255565b50505050505050565b6104aa610e60565b6001600160a01b0381166104d157604051630d23cf4160e11b815260040160405180910390fd5b600480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f95bb211a5a393c4d30c3edc9a745825fba4e6ad3e3bb949e6bf8ccdfe431a81190600090a35050565b61052b610e60565b7f000000000000000000000000000000000000000000000000000000006943440042101561056c57604051634efa54af60e11b815260040160405180910390fd5b6040516370a0823160e01b81523060048201526000907f000000000000000000000000f0db65d17e30a966c2ae6a21f6bba71cea6e97546001600160a01b0316906370a0823190602401602060405180830381865afa1580156105d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105f79190611abd565b905061062d6001600160a01b037f000000000000000000000000f0db65d17e30a966c2ae6a21f6bba71cea6e9754163383610dfc565b60405181815233907f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d59060200160405180910390a250565b61066d61093e565b610675610969565b61068184848484610e8d565b6001600160a01b038085166000908152600560205260409020805460ff191660011790556106d2907f000000000000000000000000f0db65d17e30a966c2ae6a21f6bba71cea6e9754168585610dfc565b836001600160a01b03167fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a8460405161070d91815260200190565b60405180910390a261071f6001600255565b50505050565b61072d610e60565b610735611005565b565b61073f610e60565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f16e2accad9173abff57b295b56993ec5d86b3cbf791fea02f02a6616463754ea90600090a35050565b610799610e60565b610735600061105a565b60015433906001600160a01b031681146107e05760405163118cdaa760e01b81526001600160a01b03821660048201526024015b60405180910390fd5b6107e98161105a565b50565b6004546001600160a01b03163314610816576040516282b42960e81b815260040160405180910390fd5b610735611073565b61082661093e565b61082e610969565b61083b84848484876110b6565b61071f6001600255565b61084d61093e565b610855610969565b61086285858585856110b6565b61086c6001600255565b5050505050565b61087b610e60565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907fa53935b08c042831464f1b811e652d37e0db7f6b818e8bc174097b18e09cf9ae90600090a35050565b6108d5610e60565b600180546001600160a01b0383166001600160a01b031990911681179091556109066000546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b600154600160a01b900460ff16156107355760405163d93c066560e01b815260040160405180910390fd5b600280540361098b57604051633ee5aeb560e01b815260040160405180910390fd5b60028055565b336001600160a01b038716146109ba5760405163d2a3c74160e01b815260040160405180910390fd5b6003546001600160a01b03166109e35760405163a3df9bcf60e01b815260040160405180910390fd5b82871015610a045760405163356a807560e21b815260040160405180910390fd5b610a1388888888888787610b79565b6000888152600660205260409020805460ff1916600117905582871115610a7357610a7386610a42858a611aec565b6001600160a01b037f000000000000000000000000f0db65d17e30a966c2ae6a21f6bba71cea6e9754169190610dfc565b8215610b2c57600354610ab3906001600160a01b037f000000000000000000000000f0db65d17e30a966c2ae6a21f6bba71cea6e97548116911685611271565b600354604051636e553f6560e01b8152600481018590526001600160a01b03888116602483015290911690636e553f65906044016020604051808303816000875af1158015610b06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2a9190611abd565b505b604080518881526001600160a01b038816602082015289917fabe34689ccaf0ac741fd6709e7edb1cc84889f07cff1b6649d8d2e933a932a99910160405180910390a25050505050505050565b85600003610b9a5760405163162908e360e11b815260040160405180910390fd5b60008781526006602052604090205460ff1615610bca57604051630c8d9eab60e31b815260040160405180910390fd5b6000839003610bec576040516383274ce960e01b815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000694344004210610c2c576040516323e2447f60e11b815260040160405180910390fd5b6007546001600160a01b0316610c5557604051630e4c084b60e41b815260040160405180910390fd5b604080516020810189905290810187905260026060820152600090608001604051602081830303815290604052805190602001209050610ceb8585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152507fc580bba0c2a45f805231600597d6a361aab3d36dad9ac1bc1f8e5869e72fb95c92508591506112fb9050565b610d085760405163582f497d60e11b815260040160405180910390fd5b60408051602081018a90529081018890526001600160a01b0387166060820152600090608001604051602081830303815290604052805190602001209050600080610d898387878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061131392505050565b5090925090506000816003811115610da357610da3611aff565b14610dc1576040516309bde33960e01b815260040160405180910390fd5b6007546001600160a01b03838116911614610def576040516309bde33960e01b815260040160405180910390fd5b5050505050505050505050565b6040516001600160a01b03838116602483015260448201839052610e5b91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050611360565b505050565b6000546001600160a01b031633146107355760405163118cdaa760e01b81523360048201526024016107d7565b82600003610eae5760405163162908e360e11b815260040160405180910390fd5b6001600160a01b03841660009081526005602052604090205460ff1615610ee857604051630c8d9eab60e31b815260040160405180910390fd5b6000819003610f0a576040516383274ce960e01b815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000694344004210610f4a576040516323e2447f60e11b815260040160405180910390fd5b604080516001600160a01b038616602082015290810184905260016060820152600090608001604051602081830303815290604052805190602001209050610fe88383808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152507fc580bba0c2a45f805231600597d6a361aab3d36dad9ac1bc1f8e5869e72fb95c92508591506112fb9050565b61086c5760405163582f497d60e11b815260040160405180910390fd5b61100d6113c3565b6001805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600180546001600160a01b03191690556107e9816113ed565b61107b61093e565b6001805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861103d3390565b336001600160a01b038616146110df5760405163d2a3c74160e01b815260040160405180910390fd5b6003546001600160a01b03166111085760405163a3df9bcf60e01b815260040160405180910390fd5b808410156111295760405163356a807560e21b815260040160405180910390fd5b61113585858585610e8d565b6001600160a01b0385166000908152600560205260409020805460ff191660011790558084111561116e5761116e85610a428387611aec565b8015611227576003546111ae906001600160a01b037f000000000000000000000000f0db65d17e30a966c2ae6a21f6bba71cea6e97548116911683611271565b600354604051636e553f6560e01b8152600481018390526001600160a01b03878116602483015290911690636e553f65906044016020604051808303816000875af1158015611201573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112259190611abd565b505b846001600160a01b03167fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a8560405161126291815260200190565b60405180910390a25050505050565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301526000919085169063dd62ed3e90604401602060405180830381865afa1580156112c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112e59190611abd565b905061071f84846112f68585611b15565b61143d565b60008261130885846114cd565b1490505b9392505050565b6000806000835160410361134d5760208401516040850151606086015160001a61133f88828585611512565b955095509550505050611359565b50508151600091506002905b9250925092565b60006113756001600160a01b038416836115e1565b9050805160001415801561139a5750808060200190518101906113989190611b28565b155b15610e5b57604051635274afe760e01b81526001600160a01b03841660048201526024016107d7565b600154600160a01b900460ff1661073557604051638dfc202b60e01b815260040160405180910390fd5b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b17905261148e84826115ef565b61071f576040516001600160a01b038481166024830152600060448301526114c391869182169063095ea7b390606401610e29565b61071f8482611360565b600081815b8451811015611508576114fe828683815181106114f1576114f1611b4a565b6020026020010151611697565b91506001016114d2565b5090505b92915050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a084111561154d57506000915060039050826115d7565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa1580156115a1573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166115cd575060009250600191508290506115d7565b9250600091508190505b9450945094915050565b606061130c838360006116c6565b6000806000846001600160a01b03168460405161160c9190611b60565b6000604051808303816000865af19150503d8060008114611649576040519150601f19603f3d011682016040523d82523d6000602084013e61164e565b606091505b50915091508180156116785750805115806116785750808060200190518101906116789190611b28565b801561168e57506000856001600160a01b03163b115b95945050505050565b60008183106116b357600082815260208490526040902061130c565b600083815260208390526040902061130c565b6060814710156116eb5760405163cd78605960e01b81523060048201526024016107d7565b600080856001600160a01b031684866040516117079190611b60565b60006040518083038185875af1925050503d8060008114611744576040519150601f19603f3d011682016040523d82523d6000602084013e611749565b606091505b5091509150611759868383611763565b9695505050505050565b60608261177857611773826117bf565b61130c565b815115801561178f57506001600160a01b0384163b155b156117b857604051639996b31560e01b81526001600160a01b03851660048201526024016107d7565b508061130c565b8051156117cf5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b80356001600160a01b03811681146117ff57600080fd5b919050565b60008083601f84011261181657600080fd5b50813567ffffffffffffffff81111561182e57600080fd5b6020830191508360208260051b850101111561184957600080fd5b9250929050565b60008083601f84011261186257600080fd5b50813567ffffffffffffffff81111561187a57600080fd5b60208301915083602082850101111561184957600080fd5b60008060008060008060008060c0898b0312156118ae57600080fd5b88359750602089013596506118c560408a016117e8565b9550606089013567ffffffffffffffff8111156118e157600080fd5b6118ed8b828c01611804565b9096509450506080890135925060a089013567ffffffffffffffff81111561191457600080fd5b6119208b828c01611850565b999c989b5096995094979396929594505050565b600080600080600080600060a0888a03121561194f57600080fd5b8735965060208801359550611966604089016117e8565b9450606088013567ffffffffffffffff81111561198257600080fd5b61198e8a828b01611804565b909550935050608088013567ffffffffffffffff8111156119ae57600080fd5b6119ba8a828b01611850565b989b979a50959850939692959293505050565b6000602082840312156119df57600080fd5b61130c826117e8565b600080600080606085870312156119fe57600080fd5b611a07856117e8565b935060208501359250604085013567ffffffffffffffff811115611a2a57600080fd5b611a3687828801611804565b95989497509550505050565b600060208284031215611a5457600080fd5b5035919050565b600080600080600060808688031215611a7357600080fd5b611a7c866117e8565b945060208601359350604086013567ffffffffffffffff811115611a9f57600080fd5b611aab88828901611804565b96999598509660600135949350505050565b600060208284031215611acf57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561150c5761150c611ad6565b634e487b7160e01b600052602160045260246000fd5b8082018082111561150c5761150c611ad6565b600060208284031215611b3a57600080fd5b8151801515811461130c57600080fd5b634e487b7160e01b600052603260045260246000fd5b6000825160005b81811015611b815760208186018101518583015201611b67565b50600092019182525091905056fea2646970667358221220c25e7794d626a2a02345fc10ca1465f3f55bdaba9a4c287acce186a85fb669eb64736f6c634300081c0033

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.