MATIC Price: $0.720873 (-1.01%)
Gas: 32 GWei
 

Overview

MATIC Balance

Polygon PoS Chain LogoPolygon PoS Chain LogoPolygon PoS Chain Logo0 MATIC

MATIC Value

$0.00

Sponsored

Transaction Hash
Method
Block
From
To
Value
Claim On Behalf443599672023-06-26 12:38:05334 days ago1687783085IN
Pearl: Airdrop
0 MATIC0.00407365183.63848112
Claim On Behalf442988382023-06-24 22:47:32336 days ago1687646852IN
Pearl: Airdrop
0 MATIC0.00395266178.18456773
Claim On Behalf442980442023-06-24 22:16:35336 days ago1687644995IN
Pearl: Airdrop
0 MATIC0.00425057191.61416968
Shutdown442298412023-06-23 3:22:00338 days ago1687490520IN
Pearl: Airdrop
0 MATIC0.0074322150
Claim442234702023-06-22 23:19:33338 days ago1687475973IN
Pearl: Airdrop
0 MATIC0.08118718181
Claim442231612023-06-22 23:07:28338 days ago1687475248IN
Pearl: Airdrop
0 MATIC0.09823201219
Claim442230332023-06-22 23:02:47338 days ago1687474967IN
Pearl: Airdrop
0 MATIC0.10675442238
Claim442220422023-06-22 22:25:47338 days ago1687472747IN
Pearl: Airdrop
0 MATIC0.07106361158.43034915
Claim442217582023-06-22 22:15:17338 days ago1687472117IN
Pearl: Airdrop
0 MATIC0.06863257153.0105519
Claim442217322023-06-22 22:14:21338 days ago1687472061IN
Pearl: Airdrop
0 MATIC0.06976802155.54192887
Claim442212392023-06-22 21:56:07338 days ago1687470967IN
Pearl: Airdrop
0 MATIC0.07166813159.77806347
Claim442199722023-06-22 21:09:11338 days ago1687468151IN
Pearl: Airdrop
0 MATIC0.07153225159.47514198
Claim442192962023-06-22 20:42:54338 days ago1687466574IN
Pearl: Airdrop
0 MATIC0.07625316170
Claim442191812023-06-22 20:38:46338 days ago1687466326IN
Pearl: Airdrop
0 MATIC0.07343797163.72377472
Claim442191392023-06-22 20:37:13338 days ago1687466233IN
Pearl: Airdrop
0 MATIC0.06911383154.08348251
Claim442188702023-06-22 20:27:09338 days ago1687465629IN
Pearl: Airdrop
0 MATIC0.07074999157.73116429
Claim442188422023-06-22 20:26:09338 days ago1687465569IN
Pearl: Airdrop
0 MATIC0.07227226161.1249343
Claim442183782023-06-22 20:08:57338 days ago1687464537IN
Pearl: Airdrop
0 MATIC0.07169552159.83913639
Claim442183392023-06-22 20:07:13338 days ago1687464433IN
Pearl: Airdrop
0 MATIC0.07412123165.24705205
Claim442178182023-06-22 19:48:20338 days ago1687463300IN
Pearl: Airdrop
0 MATIC0.07007307156.22202319
Claim442162862023-06-22 18:51:52338 days ago1687459912IN
Pearl: Airdrop
0 MATIC0.07112424158.56551651
Claim442147142023-06-22 17:55:07338 days ago1687456507IN
Pearl: Airdrop
0 MATIC0.07096488158.21024593
Claim442130202023-06-22 16:52:51338 days ago1687452771IN
Pearl: Airdrop
0 MATIC0.13142456293
Claim442124502023-06-22 16:31:53338 days ago1687451513IN
Pearl: Airdrop
0 MATIC0.1343632299.55145338
Claim442124362023-06-22 16:31:23338 days ago1687451483IN
Pearl: Airdrop
0 MATIC0.12696737283.06306784
View all transactions

Parent Transaction Hash Block From To Value
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Airdrop

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
File 1 of 11 : Airdrop.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.12;

import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

import "../interfaces/IVotingEscrow.sol";
import "../Epoch.sol";

/**
 * @title Airdrop Contract
 * @dev A contract for distributing tokens through an airdrop mechanism.
 */
contract Airdrop {
    using SafeERC20 for ERC20Burnable;

    uint256 public constant LOCK_PERIOD = 2 * 365 * 86400;
    uint256 public constant START_TIME = 1686268800; // 6/9/23
    uint256 public constant END_TIME = START_TIME + 2 * EPOCH_DURATION;

    address public immutable owner;

    mapping(address => uint256) private _claimable; // Amount claimable by each address
    mapping(address => address) private _creatorOf; // Addresses of contract creators

    ERC20Burnable private token;
    IVotingEscrow private ve;

    uint256 public unclaimed;

    event Claimed(address indexed claimer, address indexed onBehalf, uint256 amount);

    constructor(address _token, address _ve) {
        owner = msg.sender;
        token = ERC20Burnable(_token);
        ve = IVotingEscrow(_ve);
    }

    /**
     * @dev Initializes the mappings `_claimable` and `_creatorOf`.
     * @notice This function is called by the contract owner to initialize the contract with data.
     * @param data The initialization data encoded as a bytes array.
     * @dev The data is parsed and stored in the contract's storage using inline assembly to significantly reduce gas costs.
     */
    function init(bytes calldata data) external {
        require(msg.sender == owner, "callable only by owner");
        uint256 len = data.length;
        require(len % 52 == 0, "invalid data length");

        assembly {
            let ptr := 0x44 // Skip function selector, the offset and the length field in calldata
            let end := add(ptr, len)

            for {

            } lt(ptr, end) {

            } {
                let slot := calldataload(ptr)
                let value := shr(96, calldataload(add(ptr, 0x20)))
                sstore(slot, value)
                ptr := add(ptr, 0x34) // move to the next tuple
            }
        }
    }

    /**
     * @dev Funds the contract with the specified amount of tokens.
     * @param amount The amount of tokens to fund.
     * @notice This function can only be called by the contract owner.
     * @notice The tokens are transferred from the owner's address to the contract address.
     * @notice The approved amount of tokens for voting escrow is increased.
     */
    function fund(uint256 amount) external {
        require(msg.sender == owner, "callable only by owner");
        require(block.timestamp < END_TIME, "Airdrop period is over");
        token.safeTransferFrom(msg.sender, address(this), amount);
        unclaimed += amount;
        token.approve(address(ve), unclaimed);
    }

    /**
     * @dev Shuts down the airdrop and burns any remaining unclaimed tokens.
     * @notice This function can only be called by the contract owner.
     * @notice The function can only be called after the end time of the airdrop.
     * @notice All unclaimed tokens are burned and the approval for voting escrow is reset.
     */
    function shutdown() external {
        require(msg.sender == owner, "callable only by owner");
        require(block.timestamp >= END_TIME, "Airdrop period is not over");
        uint256 burnAmount = unclaimed;
        require(burnAmount > 0, "nothing to burn");
        unclaimed = 0;
        token.approve(address(ve), 0);
        token.burn(burnAmount);
    }

    /**
     * @dev Returns the amount of tokens claimable by the specified account.
     * @param account The account to check for claimable tokens.
     * @return amount The amount of tokens claimable.
     */
    function claimable(address account) public view returns (uint256 amount) {
        if (_isActive()) {
            amount = _claimable[account];
            if (amount > unclaimed) {
                amount = unclaimed;
            }
        }
    }

    /**
     * @dev Allows an account to claim their tokens.
     *
     * The tokens will be locked in the voting escrow for the specified lock period.
     *
     * @notice The caller must have claimable tokens.
     * @notice The tokens are locked in the voting escrow contract and ownership is transferred to the claimer.
     */
    function claim() external {
        uint256 claimableAmount = claimable(msg.sender);
        require(claimableAmount > 0, "nothing to claim");
        delete _claimable[msg.sender];
        emit Claimed(msg.sender, msg.sender, claimableAmount);
        _lockAndSend(claimableAmount, msg.sender);
    }

    /**
     * @dev Allows the creator of an account (contract) to claim tokens on behalf of that account.
     *
     * The tokens will be locked in the voting escrow for the specified lock period.
     *
     * @param account The account to claim tokens on behalf of.
     * @notice The caller must be the creator of the specified account.
     * @notice The tokens are locked in the voting escrow contract and ownership is transferred to the claimer.
     */
    function claimOnBehalf(address account) external {
        uint256 claimableAmount = claimable(account);
        require(claimableAmount > 0, "nothing to claim");
        address creator = _creatorOf[account];
        require(msg.sender == creator, "not allowed");
        delete _claimable[account];
        delete _creatorOf[account];
        emit Claimed(msg.sender, account, claimableAmount);
        _lockAndSend(claimableAmount, msg.sender);
    }

    /**
     * @dev Locks the specified amount of tokens in the voting escrow and sends them to the specified address.
     * @param amount The amount of tokens to lock and send.
     * @param to The address to send the locked tokens to.
     * @notice The specified amount of tokens is subtracted from the unclaimed token balance.
     * @notice A new lock is created in the voting escrow contract with the specified amount, lock period, and receiver address.
     */
    function _lockAndSend(uint256 amount, address to) internal {
        unclaimed -= amount;
        uint256 tokenId = ve.create_lock_for(amount, LOCK_PERIOD, to);
        require(tokenId != 0 && ve.ownerOf(tokenId) == to, "minting failed");
    }

    /**
     * @dev Checks if the airdrop is currently active.
     * @return A boolean indicating whether the airdrop is active.
     * @notice The airdrop is active if the current timestamp is within the start and end time of the airdrop.
     */
    function _isActive() internal view returns (bool) {
        return block.timestamp >= START_TIME && block.timestamp < END_TIME;
    }
}

File 1 of 11 : ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * The default value of {decimals} is 18. To change this, you should override
 * this function so it returns a different value.
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the default value returned by this function, unless
     * it's overridden.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address to, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, allowance(owner, spender) + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        address owner = _msgSender();
        uint256 currentAllowance = allowance(owner, spender);
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `from` to `to`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     */
    function _transfer(address from, address to, uint256 amount) internal virtual {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
            // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by
            // decrementing then incrementing.
            _balances[to] += amount;
        }

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        unchecked {
            // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.
            _balances[account] += amount;
        }
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
            // Overflow not possible: amount <= accountBalance <= totalSupply.
            _totalSupply -= amount;
        }

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(address owner, address spender, uint256 amount) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Updates `owner` s allowance for `spender` based on spent `amount`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}
}

File 1 of 11 : ERC20Burnable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Extension of {ERC20} that allows token holders to destroy both their own
 * tokens and those that they have an allowance for, in a way that can be
 * recognized off-chain (via event analysis).
 */
abstract contract ERC20Burnable is Context, ERC20 {
    /**
     * @dev Destroys `amount` tokens from the caller.
     *
     * See {ERC20-_burn}.
     */
    function burn(uint256 amount) public virtual {
        _burn(_msgSender(), amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, deducting from the caller's
     * allowance.
     *
     * See {ERC20-_burn} and {ERC20-allowance}.
     *
     * Requirements:
     *
     * - the caller must have allowance for ``accounts``'s tokens of at least
     * `amount`.
     */
    function burnFrom(address account, uint256 amount) public virtual {
        _spendAllowance(account, _msgSender(), amount);
        _burn(account, amount);
    }
}

File 1 of 11 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
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);
}

File 1 of 11 : IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity ^0.8.0;

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

File 1 of 11 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 1 of 11 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

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

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

    /**
     * @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.encodeWithSelector(token.transfer.selector, 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.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

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

    /**
     * @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);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
        }
    }

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

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

    /**
     * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
     * Revert on invalid signature.
     */
    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

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

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

    /**
     * @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.isContract(address(token));
    }
}

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://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.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

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

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

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

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

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

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

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

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

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

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) 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(errorMessage);
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

File 2 of 11 : Epoch.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

uint256 constant EPOCH_DURATION = 7 days;

File 2 of 11 : IVotingEscrow.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IVotingEscrow {
    struct Point {
        int128 bias;
        int128 slope; // # -dweight / dt
        uint256 ts;
        uint256 blk; // block
    }

    struct LockedBalance {
        int128 amount;
        uint256 end;
    }

    function create_lock_for(uint256 _value, uint256 _lock_duration, address _to) external returns (uint256);

    function locked(uint256 id) external view returns (LockedBalance memory);

    function tokenOfOwnerByIndex(address _owner, uint256 _tokenIndex) external view returns (uint256);

    function token() external view returns (address);

    function team() external returns (address);

    function epoch() external view returns (uint256);

    function point_history(uint256 loc) external view returns (Point memory);

    function user_point_history(uint256 tokenId, uint256 loc) external view returns (Point memory);

    function user_point_epoch(uint256 tokenId) external view returns (uint256);

    function ownerOf(uint256) external view returns (address);

    function isApprovedOrOwner(address, uint256) external view returns (bool);

    function transferFrom(address, address, uint256) external;

    function voted(uint256) external view returns (bool);

    function attachments(uint256) external view returns (uint256);

    function voting(uint256 tokenId) external;

    function abstain(uint256 tokenId) external;

    function attach(uint256 tokenId) external;

    function detach(uint256 tokenId) external;

    function checkpoint() external;

    function deposit_for(uint256 tokenId, uint256 value) external;

    function balanceOfNFT(uint256 _id) external view returns (uint256);

    function balanceOf(address _owner) external view returns (uint256);

    function totalSupply() external view returns (uint256);

    function supply() external view returns (uint256);

    function decimals() external view returns (uint8);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_ve","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"claimer","type":"address"},{"indexed":true,"internalType":"address","name":"onBehalf","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claimed","type":"event"},{"inputs":[],"name":"END_TIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LOCK_PERIOD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"START_TIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"claimOnBehalf","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"claimable","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"fund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"shutdown","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unclaimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

60a060405234801561001057600080fd5b506040516110d43803806110d483398101604081905261002f91610080565b33608052600280546001600160a01b039384166001600160a01b031991821617909155600380549290931691161790556100b3565b80516001600160a01b038116811461007b57600080fd5b919050565b6000806040838503121561009357600080fd5b61009c83610064565b91506100aa60208401610064565b90509250929050565b608051610ff16100e3600039600081816101450152818161020c0152818161050f01526106a10152610ff16000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c80636466f45e11610081578063ca1d209d1161005b578063ca1d209d1461017f578063ddaa26ad14610192578063fc0e74d11461019d57600080fd5b80636466f45e14610124578063669416b8146101375780638da5cb5b1461014057600080fd5b8063402914f5116100b2578063402914f5146100f45780634ddf47d4146101075780634e71d92d1461011c57600080fd5b80631820cabb146100ce57806337ba682d146100ec575b600080fd5b6100d96303c2670081565b6040519081526020015b60405180910390f35b6100d96101a5565b6100d9610102366004610dc6565b6101c4565b61011a610115366004610dea565b610201565b005b61011a610302565b61011a610132366004610dc6565b6103b2565b6100d960045481565b6101677f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100e3565b61011a61018d366004610e5c565b610504565b6100d96364826b8081565b61011a610696565b6101b362093a806002610e8b565b6101c1906364826b80610ea8565b81565b60006101ce6108c2565b156101fc57506001600160a01b0381166000908152602081905260409020546004548111156101fc57506004545b919050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461027e5760405162461bcd60e51b815260206004820152601660248201527f63616c6c61626c65206f6e6c79206279206f776e65720000000000000000000060448201526064015b60405180910390fd5b8061028a603482610ebb565b156102d75760405162461bcd60e51b815260206004820152601360248201527f696e76616c69642064617461206c656e677468000000000000000000000000006044820152606401610275565b60448181015b808210156102fb57602082013560601c8235556034909101906102dd565b5050505050565b600061030d336101c4565b90506000811161035f5760405162461bcd60e51b815260206004820152601060248201527f6e6f7468696e6720746f20636c61696d000000000000000000000000000000006044820152606401610275565b3360008181526020818152604080832092909255905183815282917ff7a40077ff7a04c7e61f6f26fb13774259ddf1b6bce9ecf26a8276cdd3992683910160405180910390a36103af81336108f7565b50565b60006103bd826101c4565b90506000811161040f5760405162461bcd60e51b815260206004820152601060248201527f6e6f7468696e6720746f20636c61696d000000000000000000000000000000006044820152606401610275565b6001600160a01b03808316600090815260016020526040902054163381146104795760405162461bcd60e51b815260206004820152600b60248201527f6e6f7420616c6c6f7765640000000000000000000000000000000000000000006044820152606401610275565b6001600160a01b038316600081815260208181526040808320839055600182529182902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055905184815233917ff7a40077ff7a04c7e61f6f26fb13774259ddf1b6bce9ecf26a8276cdd3992683910160405180910390a36104ff82336108f7565b505050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461057c5760405162461bcd60e51b815260206004820152601660248201527f63616c6c61626c65206f6e6c79206279206f776e6572000000000000000000006044820152606401610275565b61058a62093a806002610e8b565b610598906364826b80610ea8565b42106105e65760405162461bcd60e51b815260206004820152601660248201527f41697264726f7020706572696f64206973206f766572000000000000000000006044820152606401610275565b6002546105fe906001600160a01b0316333084610a94565b80600460008282546106109190610ea8565b90915550506002546003546004805460405163095ea7b360e01b81526001600160a01b0393841692810192909252602482015291169063095ea7b3906044016020604051808303816000875af115801561066e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106929190610edd565b5050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461070e5760405162461bcd60e51b815260206004820152601660248201527f63616c6c61626c65206f6e6c79206279206f776e6572000000000000000000006044820152606401610275565b61071c62093a806002610e8b565b61072a906364826b80610ea8565b4210156107795760405162461bcd60e51b815260206004820152601a60248201527f41697264726f7020706572696f64206973206e6f74206f7665720000000000006044820152606401610275565b600454806107c95760405162461bcd60e51b815260206004820152600f60248201527f6e6f7468696e6720746f206275726e00000000000000000000000000000000006044820152606401610275565b6000600481815560025460035460405163095ea7b360e01b81526001600160a01b03918216938101939093526024830193909352919091169063095ea7b3906044016020604051808303816000875af115801561082a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084e9190610edd565b506002546040517f42966c68000000000000000000000000000000000000000000000000000000008152600481018390526001600160a01b03909116906342966c6890602401600060405180830381600087803b1580156108ae57600080fd5b505af11580156102fb573d6000803e3d6000fd5b60006364826b8042101580156108f257506108e162093a806002610e8b565b6108ef906364826b80610ea8565b42105b905090565b81600460008282546109099190610eff565b90915550506003546040517fd4e54c3b000000000000000000000000000000000000000000000000000000008152600481018490526303c2670060248201526001600160a01b038381166044830152600092169063d4e54c3b906064016020604051808303816000875af1158015610985573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109a99190610f12565b90508015801590610a4857506003546040517f6352211e000000000000000000000000000000000000000000000000000000008152600481018390526001600160a01b03848116921690636352211e90602401602060405180830381865afa158015610a19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3d9190610f2b565b6001600160a01b0316145b6104ff5760405162461bcd60e51b815260206004820152600e60248201527f6d696e74696e67206661696c65640000000000000000000000000000000000006044820152606401610275565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052610b1c908590610b22565b50505050565b6000610b77826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610c0a9092919063ffffffff16565b9050805160001480610b98575080806020019051810190610b989190610edd565b6104ff5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610275565b6060610c198484600085610c21565b949350505050565b606082471015610c995760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610275565b600080866001600160a01b03168587604051610cb59190610f6c565b60006040518083038185875af1925050503d8060008114610cf2576040519150601f19603f3d011682016040523d82523d6000602084013e610cf7565b606091505b5091509150610d0887838387610d13565b979650505050505050565b60608315610d82578251600003610d7b576001600160a01b0385163b610d7b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610275565b5081610c19565b610c198383815115610d975781518083602001fd5b8060405162461bcd60e51b81526004016102759190610f88565b6001600160a01b03811681146103af57600080fd5b600060208284031215610dd857600080fd5b8135610de381610db1565b9392505050565b60008060208385031215610dfd57600080fd5b823567ffffffffffffffff80821115610e1557600080fd5b818501915085601f830112610e2957600080fd5b813581811115610e3857600080fd5b866020828501011115610e4a57600080fd5b60209290920196919550909350505050565b600060208284031215610e6e57600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610ea257610ea2610e75565b92915050565b80820180821115610ea257610ea2610e75565b600082610ed857634e487b7160e01b600052601260045260246000fd5b500690565b600060208284031215610eef57600080fd5b81518015158114610de357600080fd5b81810381811115610ea257610ea2610e75565b600060208284031215610f2457600080fd5b5051919050565b600060208284031215610f3d57600080fd5b8151610de381610db1565b60005b83811015610f63578181015183820152602001610f4b565b50506000910152565b60008251610f7e818460208701610f48565b9190910192915050565b6020815260008251806020840152610fa7816040850160208701610f48565b601f01601f1916919091016040019291505056fea26469706673582212203183b12caa8d0465a4ddd432d5d2f8d31f3232a9022009d94b212da6ea02978a64736f6c634300081200330000000000000000000000007238390d5f6f64e67c3211c343a410e2a3dec142000000000000000000000000f484c4ab97ee393f8d1af6948b70bd88a033cbab

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100c95760003560e01c80636466f45e11610081578063ca1d209d1161005b578063ca1d209d1461017f578063ddaa26ad14610192578063fc0e74d11461019d57600080fd5b80636466f45e14610124578063669416b8146101375780638da5cb5b1461014057600080fd5b8063402914f5116100b2578063402914f5146100f45780634ddf47d4146101075780634e71d92d1461011c57600080fd5b80631820cabb146100ce57806337ba682d146100ec575b600080fd5b6100d96303c2670081565b6040519081526020015b60405180910390f35b6100d96101a5565b6100d9610102366004610dc6565b6101c4565b61011a610115366004610dea565b610201565b005b61011a610302565b61011a610132366004610dc6565b6103b2565b6100d960045481565b6101677f000000000000000000000000839aeea3537989ce05ea1b218ab0f25e54cc3b3f81565b6040516001600160a01b0390911681526020016100e3565b61011a61018d366004610e5c565b610504565b6100d96364826b8081565b61011a610696565b6101b362093a806002610e8b565b6101c1906364826b80610ea8565b81565b60006101ce6108c2565b156101fc57506001600160a01b0381166000908152602081905260409020546004548111156101fc57506004545b919050565b336001600160a01b037f000000000000000000000000839aeea3537989ce05ea1b218ab0f25e54cc3b3f161461027e5760405162461bcd60e51b815260206004820152601660248201527f63616c6c61626c65206f6e6c79206279206f776e65720000000000000000000060448201526064015b60405180910390fd5b8061028a603482610ebb565b156102d75760405162461bcd60e51b815260206004820152601360248201527f696e76616c69642064617461206c656e677468000000000000000000000000006044820152606401610275565b60448181015b808210156102fb57602082013560601c8235556034909101906102dd565b5050505050565b600061030d336101c4565b90506000811161035f5760405162461bcd60e51b815260206004820152601060248201527f6e6f7468696e6720746f20636c61696d000000000000000000000000000000006044820152606401610275565b3360008181526020818152604080832092909255905183815282917ff7a40077ff7a04c7e61f6f26fb13774259ddf1b6bce9ecf26a8276cdd3992683910160405180910390a36103af81336108f7565b50565b60006103bd826101c4565b90506000811161040f5760405162461bcd60e51b815260206004820152601060248201527f6e6f7468696e6720746f20636c61696d000000000000000000000000000000006044820152606401610275565b6001600160a01b03808316600090815260016020526040902054163381146104795760405162461bcd60e51b815260206004820152600b60248201527f6e6f7420616c6c6f7765640000000000000000000000000000000000000000006044820152606401610275565b6001600160a01b038316600081815260208181526040808320839055600182529182902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055905184815233917ff7a40077ff7a04c7e61f6f26fb13774259ddf1b6bce9ecf26a8276cdd3992683910160405180910390a36104ff82336108f7565b505050565b336001600160a01b037f000000000000000000000000839aeea3537989ce05ea1b218ab0f25e54cc3b3f161461057c5760405162461bcd60e51b815260206004820152601660248201527f63616c6c61626c65206f6e6c79206279206f776e6572000000000000000000006044820152606401610275565b61058a62093a806002610e8b565b610598906364826b80610ea8565b42106105e65760405162461bcd60e51b815260206004820152601660248201527f41697264726f7020706572696f64206973206f766572000000000000000000006044820152606401610275565b6002546105fe906001600160a01b0316333084610a94565b80600460008282546106109190610ea8565b90915550506002546003546004805460405163095ea7b360e01b81526001600160a01b0393841692810192909252602482015291169063095ea7b3906044016020604051808303816000875af115801561066e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106929190610edd565b5050565b336001600160a01b037f000000000000000000000000839aeea3537989ce05ea1b218ab0f25e54cc3b3f161461070e5760405162461bcd60e51b815260206004820152601660248201527f63616c6c61626c65206f6e6c79206279206f776e6572000000000000000000006044820152606401610275565b61071c62093a806002610e8b565b61072a906364826b80610ea8565b4210156107795760405162461bcd60e51b815260206004820152601a60248201527f41697264726f7020706572696f64206973206e6f74206f7665720000000000006044820152606401610275565b600454806107c95760405162461bcd60e51b815260206004820152600f60248201527f6e6f7468696e6720746f206275726e00000000000000000000000000000000006044820152606401610275565b6000600481815560025460035460405163095ea7b360e01b81526001600160a01b03918216938101939093526024830193909352919091169063095ea7b3906044016020604051808303816000875af115801561082a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084e9190610edd565b506002546040517f42966c68000000000000000000000000000000000000000000000000000000008152600481018390526001600160a01b03909116906342966c6890602401600060405180830381600087803b1580156108ae57600080fd5b505af11580156102fb573d6000803e3d6000fd5b60006364826b8042101580156108f257506108e162093a806002610e8b565b6108ef906364826b80610ea8565b42105b905090565b81600460008282546109099190610eff565b90915550506003546040517fd4e54c3b000000000000000000000000000000000000000000000000000000008152600481018490526303c2670060248201526001600160a01b038381166044830152600092169063d4e54c3b906064016020604051808303816000875af1158015610985573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109a99190610f12565b90508015801590610a4857506003546040517f6352211e000000000000000000000000000000000000000000000000000000008152600481018390526001600160a01b03848116921690636352211e90602401602060405180830381865afa158015610a19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3d9190610f2b565b6001600160a01b0316145b6104ff5760405162461bcd60e51b815260206004820152600e60248201527f6d696e74696e67206661696c65640000000000000000000000000000000000006044820152606401610275565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052610b1c908590610b22565b50505050565b6000610b77826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610c0a9092919063ffffffff16565b9050805160001480610b98575080806020019051810190610b989190610edd565b6104ff5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610275565b6060610c198484600085610c21565b949350505050565b606082471015610c995760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610275565b600080866001600160a01b03168587604051610cb59190610f6c565b60006040518083038185875af1925050503d8060008114610cf2576040519150601f19603f3d011682016040523d82523d6000602084013e610cf7565b606091505b5091509150610d0887838387610d13565b979650505050505050565b60608315610d82578251600003610d7b576001600160a01b0385163b610d7b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610275565b5081610c19565b610c198383815115610d975781518083602001fd5b8060405162461bcd60e51b81526004016102759190610f88565b6001600160a01b03811681146103af57600080fd5b600060208284031215610dd857600080fd5b8135610de381610db1565b9392505050565b60008060208385031215610dfd57600080fd5b823567ffffffffffffffff80821115610e1557600080fd5b818501915085601f830112610e2957600080fd5b813581811115610e3857600080fd5b866020828501011115610e4a57600080fd5b60209290920196919550909350505050565b600060208284031215610e6e57600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610ea257610ea2610e75565b92915050565b80820180821115610ea257610ea2610e75565b600082610ed857634e487b7160e01b600052601260045260246000fd5b500690565b600060208284031215610eef57600080fd5b81518015158114610de357600080fd5b81810381811115610ea257610ea2610e75565b600060208284031215610f2457600080fd5b5051919050565b600060208284031215610f3d57600080fd5b8151610de381610db1565b60005b83811015610f63578181015183820152602001610f4b565b50506000910152565b60008251610f7e818460208701610f48565b9190910192915050565b6020815260008251806020840152610fa7816040850160208701610f48565b601f01601f1916919091016040019291505056fea26469706673582212203183b12caa8d0465a4ddd432d5d2f8d31f3232a9022009d94b212da6ea02978a64736f6c63430008120033

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

0000000000000000000000007238390d5f6f64e67c3211c343a410e2a3dec142000000000000000000000000f484c4ab97ee393f8d1af6948b70bd88a033cbab

-----Decoded View---------------
Arg [0] : _token (address): 0x7238390d5f6F64e67c3211C343A410E2A3DEc142
Arg [1] : _ve (address): 0xf484c4AB97ee393F8D1aF6948B70bd88a033cBAB

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000007238390d5f6f64e67c3211c343a410e2a3dec142
Arg [1] : 000000000000000000000000f484c4ab97ee393f8d1af6948b70bd88a033cbab


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ 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.