Перейти к содержимому
Проверенный контрактЧастичноеMIT

GweiFunVestFactory

Адрес0xe11237ca3fd51b98e41ef7c6ed8a82be56769949
Баланс

0 ETH

 

Транзакций

1

 

Компилятор

solc 0.8.26

 

Тот же код

Только этот контракт

 

Подробности

Компилятор
solc 0.8.26+commit.8a97fa7a
Язык
solidity
Оптимизация
Да, 200 прогонов
Версия EVM
cancun
Лицензия
MIT
Совпадение
Частичноекод создания: да, код в сети: да
Проверен на Sourcify
Создан в блоке
26 443 878
Транзакция создания
0x384f79f113…0fb883ac85

88 файлов

Исходный код большой: показывается один файл. Выберите файл в списке.

src/creators/GweiFunVestFactory.sol

// SPDX-License-Identifier: MIT
/*
 ╔═══════════════════════════════════════════════════════════════════════════════════════╗
 ║ ▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚ ║
 ║ ▞                                                                                   ▚ ║
 ║ ▞   ┌─[ SYS ]──────────────────────────────────────────────────────────[ v4 ]─┐     ▚ ║
 ║ ▞   │ ◉ ONLINE   ◎ UNISWAP v4   ◎ ETHEREUM MAINNET   ◎ PERMISSIONLESS LAUNCH  │     ▚ ║
 ║ ▞   └─────────────────────────────────────────────────────────────────────────┘     ▚ ║
 ║ ▞                                                                                   ▚ ║
 ║ ▞       ▄████████▄ ██      ██ ████████ ██    ████████ ██    ██ ███    ██            ▚ ║
 ║ ▞      ██▀▀▀▀▀▀▀▀  ██  ▄▄  ██ ██▀▀▀▀▀▀ ██    ██▀▀▀▀▀▀ ██    ██ ████▄  ██            ▚ ║
 ║ ▞      ██   ▄████▄ ██ ████ ██ ██████   ██    ██████   ██    ██ ██ ▀██▄██            ▚ ║
 ║ ▞      ██   ▀▀▀▀██ ██▀█▀▀█▀██ ██▄▄▄▄▄▄ ██ ▄▄ ██       ▀██▄▄██▀ ██   ▀███            ▚ ║
 ║ ▞       ▀████████▀ ▀██▀  ▀██▀ ████████ ██ ▀▀ ██        ▀████▀  ██    ▀██            ▚ ║
 ║ ▞                                                                                   ▚ ║
 ║ ▞   ╭─────────────────────────────────────────────────────────────────────────╮     ▚ ║
 ║ ▞   │  ░▒▓█▓▒░   T O K E N   L A U N C H P A D   ·   H O O K   P O W E R E D  │     ▚ ║
 ║ ▞   ╰─────────────────────────────────────────────────────────────────────────╯     ▚ ║
 ║ ▞                                                                                   ▚ ║
 ║ ▞   ┌──────────────────────────────────┐   ┌──────────────────────────────────┐     ▚ ║
 ║ ▞   │  ◈  https://gwei.fun/            │   │  ✕  https://x.com/gweidotfun     │     ▚ ║
 ║ ▞   └──────────────────────────────────┘   └──────────────────────────────────┘     ▚ ║
 ║ ▞                                                                                   ▚ ║
 ║ ▞   ·──·──·──·──·──·──·──·──·──·──·──·──·──·──·──·──·──·──·──·──·──·──·──·──·──·    ▚ ║
 ║ ▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚▚ ║
 ╚═══════════════════════════════════════════════════════════════════════════════════════╝
*/
pragma solidity 0.8.26;

import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

import {IGweiFunLaunchpad} from "../shared/IGweiFunLaunchpad.sol";
import {GweiFunPoolSeeder} from "../platform/GweiFunPoolSeeder.sol";
import {GweiFunVestedToken} from "../assets/GweiFunVestedToken.sol";
import {GweiFunFactory, CreateArgs} from "./GweiFunFactory.sol";

/// @title GweiFunVestFactory
/// @notice Venue for creations with a team allocation. The unpooled supply never reaches the
///         creator: it is held by the token contract and paid out linearly after an optional
///         cliff, all checkable on-chain.
/// @dev `extra` = `abi.encode(address beneficiary, uint64 cliffSeconds, uint64 vestSeconds)`.
/// @custom:version 1.1
contract GweiFunVestFactory is GweiFunFactory {
    using SafeERC20 for IERC20;

    /// @dev Nothing would be left to vest.
    error NothingToVest();

    constructor(address owner_, IGweiFunLaunchpad launchpad_, GweiFunPoolSeeder poolSeeder_)
        GweiFunFactory(owner_, launchpad_, poolSeeder_)
    {}

    function venueId() external pure override returns (string memory) {
        return "venue.vesting";
    }

    /// @dev Any active pair asset.
    function _supportsQuoteAsset(address) internal pure override returns (bool) {
        return true;
    }

    /// @dev A 100% pool share is refused during validation already.
    function _validateVenue(CreateArgs calldata a) internal pure override {
        if (a.poolShareBips == BIPS) revert NothingToVest();
    }

    function _deployToken(CreateArgs calldata a, address creator) internal override returns (address) {
        return address(new GweiFunVestedToken(_tokenSetup(a, creator)));
    }

    /// @dev Moves the leftover into the token itself and starts the schedule.
    function _allocateRemainder(address token, CreateArgs calldata, address, uint256 leftover) internal override {
        if (leftover == 0) revert NothingToVest();
        IERC20(token).safeTransfer(token, leftover);
        GweiFunVestedToken(token).startVesting(leftover);
    }
}
Настройки компилятораПоказать
{
  "viaIR": false,
  "metadata": {
    "appendCBOR": true,
    "bytecodeHash": "none",
    "useLiteralContent": false
  },
  "optimizer": {
    "runs": 200,
    "enabled": true
  },
  "evmVersion": "cancun",
  "remappings": [
    "@uniswap/v4-core/=node_modules/@uniswap/v4-periphery/lib/v4-core/",
    "@uniswap/v4-periphery/=node_modules/@uniswap/v4-periphery/",
    "v4-core/=node_modules/@uniswap/v4-periphery/lib/v4-core/",
    "v4-periphery/=node_modules/@uniswap/v4-periphery/",
    "permit2/=node_modules/@uniswap/v4-periphery/lib/permit2/",
    "solmate/=node_modules/@uniswap/v4-periphery/lib/v4-core/lib/solmate/",
    "forge-std/=node_modules/@uniswap/v4-periphery/lib/v4-core/lib/forge-std/src/",
    "ds-test/=node_modules/@uniswap/v4-periphery/lib/v4-core/lib/forge-std/lib/ds-test/src/",
    "openzeppelin-contracts/contracts/=node_modules/@openzeppelin/contracts/",
    "@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/",
    "node_modules/@uniswap/v4-periphery/lib/v4-core/lib/openzeppelin-contracts/:erc4626-tests/=node_modules/@uniswap/v4-periphery/lib/v4-core/lib/openzeppelin-contracts/lib/erc4626-tests/",
    "/Users/steve/Documents/gweifun/node_modules/@uniswap/v4-periphery/lib/v4-core/lib/openzeppelin-contracts/:erc4626-tests/=node_modules/@uniswap/v4-periphery/lib/v4-core/lib/openzeppelin-contracts/lib/erc4626-tests/",
    "node_modules/@uniswap/v4-core/lib/openzeppelin-contracts/:erc4626-tests/=node_modules/@uniswap/v4-core/lib/openzeppelin-contracts/lib/erc4626-tests/",
    "/Users/steve/Documents/gweifun/node_modules/@uniswap/v4-core/lib/openzeppelin-contracts/:erc4626-tests/=node_modules/@uniswap/v4-core/lib/openzeppelin-contracts/lib/erc4626-tests/",
    "node_modules/@uniswap/v4-periphery/lib/permit2/:openzeppelin-contracts/contracts/=node_modules/@openzeppelin/contracts/",
    "/Users/steve/Documents/gweifun/node_modules/@uniswap/v4-periphery/lib/permit2/:openzeppelin-contracts/contracts/=node_modules/@openzeppelin/contracts/",
    "node_modules/@uniswap/v4-periphery/lib/permit2/:openzeppelin-contracts/=node_modules/@uniswap/v4-periphery/lib/permit2/lib/openzeppelin-contracts/",
    "/Users/steve/Documents/gweifun/node_modules/@uniswap/v4-periphery/lib/permit2/:openzeppelin-contracts/=node_modules/@uniswap/v4-periphery/lib/permit2/lib/openzeppelin-contracts/",
    "node_modules/@uniswap/v4-periphery/lib/v4-core/:openzeppelin-contracts/contracts/=node_modules/@openzeppelin/contracts/",
    "/Users/steve/Documents/gweifun/node_modules/@uniswap/v4-periphery/lib/v4-core/:openzeppelin-contracts/contracts/=node_modules/@openzeppelin/contracts/",
    "node_modules/@uniswap/v4-periphery/lib/v4-core/:openzeppelin-contracts/=node_modules/@uniswap/v4-periphery/lib/v4-core/lib/openzeppelin-contracts/",
    "/Users/steve/Documents/gweifun/node_modules/@uniswap/v4-periphery/lib/v4-core/:openzeppelin-contracts/=node_modules/@uniswap/v4-periphery/lib/v4-core/lib/openzeppelin-contracts/",
    "node_modules/@uniswap/v4-core/:openzeppelin-contracts/contracts/=node_modules/@openzeppelin/contracts/",
    "/Users/steve/Documents/gweifun/node_modules/@uniswap/v4-core/:openzeppelin-contracts/contracts/=node_modules/@openzeppelin/contracts/",
    "node_modules/@uniswap/v4-core/:openzeppelin-contracts/=node_modules/@uniswap/v4-core/lib/openzeppelin-contracts/",
    "/Users/steve/Documents/gweifun/node_modules/@uniswap/v4-core/:openzeppelin-contracts/=node_modules/@uniswap/v4-core/lib/openzeppelin-contracts/",
    "@openzeppelin/=node_modules/@openzeppelin/",
    "@uniswap/=node_modules/@uniswap/",
    "erc4626-tests/=node_modules/@uniswap/v4-core/lib/openzeppelin-contracts/lib/erc4626-tests/",
    "forge-gas-snapshot/=node_modules/@uniswap/v4-periphery/lib/permit2/lib/forge-gas-snapshot/",
    "openzeppelin-contracts/=node_modules/@uniswap/v4-core/lib/openzeppelin-contracts/"
  ]
}

Исходный код и метаданные: Sourcify.

Исходный код принадлежит авторам контракта.