POL Price: $0.566826 (-4.43%)
 

Overview

Max Total Supply

1,000,000,000 GOON

Holders

3,287 ( -0.213%)

Market

Price

$0.0011 @ 0.001924 POL (-7.20%)

Onchain Market Cap

$1,090,330.00

Circulating Supply Market Cap

$1,090,333.00

Other Info

Token Contract (WITH 18 Decimals)

Balance
0 GOON

Value
$0.00
0xdc0ca142cdb88d0bee3c3712991623ceb638b28e
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

The mission of GOON is to be the social layer and content engine of the Polygon AggLayer community, serving as the best evangelist for all things Polygon

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

Contract Name:
WenToken

Compiler Version
v0.8.25+commit.b61c2a91

Optimization Enabled:
Yes with 1000000 runs

Other Settings:
paris EvmVersion, None license
File 1 of 10 : WenToken.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.25;

import { ERC20 } from "solmate/tokens/ERC20.sol";
import { WenFoundry } from "./WenFoundry.sol";

error NotWenFoundry();
error NotApprovable();

/// @title The Wen protocol ERC20 token template.
/// @author strobie <@0xstrobe>
/// @notice The token allowance is restricted to only the WenFoundry contract until graduation, so before that, the token is transferable but not tradable.
/// @dev The view functions are intended for frontend usage with limit <<< n instead of limit ≈ n, so the sorting algos are effectively O(n). Data is stored onchain for improved UX.
contract WenToken is ERC20 {
    struct Metadata {
        WenToken token;
        string name;
        string symbol;
        string description;
        string extended;
        address creator;
        bool isGraduated;
        uint256 mcap;
    }

    string public description;
    string public extended;
    WenFoundry public immutable wenFoundry;
    address public immutable creator;

    address[] public holders;
    mapping(address => bool) public isHolder;

    /// @notice Locked before graduation to restrict trading to WenFoundry
    bool public isApprovable = false;

    constructor(
        string memory _name,
        string memory _symbol,
        uint8 _decimals,
        uint256 _supply,
        string memory _description,
        string memory _extended,
        address _wenFoundry,
        address _creator
    ) ERC20(_name, _symbol, _decimals) {
        description = _description;
        extended = _extended;
        wenFoundry = WenFoundry(_wenFoundry);
        creator = _creator;

        _mint(msg.sender, _supply);
        _addHolder(msg.sender);
    }

    function _addHolder(address holder) private {
        if (!isHolder[holder]) {
            holders.push(holder);
            isHolder[holder] = true;
        }
    }

    function getMetadata() public view returns (Metadata memory) {
        WenFoundry.Pool memory pool = wenFoundry.getPool(this);
        return Metadata(WenToken(address(this)), this.name(), this.symbol(), description, extended, creator, isGraduated(), pool.lastMcapInEth);
    }

    function isGraduated() public view returns (bool) {
        WenFoundry.Pool memory pool = wenFoundry.getPool(this);
        return pool.headmaster != address(0);
    }

    function setIsApprovable(bool _isApprovable) public {
        if (msg.sender != address(wenFoundry)) revert NotWenFoundry();
        isApprovable = _isApprovable;
    }

    function transfer(address to, uint256 amount) public override returns (bool) {
        _addHolder(to);
        return super.transfer(to, amount);
    }

    function transferFrom(address from, address to, uint256 amount) public override returns (bool) {
        // Pre-approve WenFoundry for improved UX
        if (allowance[from][address(wenFoundry)] != type(uint256).max) {
            allowance[from][address(wenFoundry)] = type(uint256).max;
        }
        _addHolder(to);
        return super.transferFrom(from, to, amount);
    }

    function approve(address spender, uint256 amount) public override returns (bool) {
        if (!isApprovable) revert NotApprovable();

        return super.approve(spender, amount);
    }

    function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public override {
        if (!isApprovable) revert NotApprovable();

        super.permit(owner, spender, value, deadline, v, r, s);
    }

    /// Get all addresses who have ever held the token with their balances
    /// @return The holders and their balances
    /// @notice Some holders may have a zero balance
    function getHoldersWithBalance() public view returns (address[] memory, uint256[] memory) {
        uint256 length = holders.length;
        uint256[] memory balances = new uint256[](length);

        for (uint256 i = 0; i < length; i++) {
            address holder = holders[i];
            uint256 balance = balanceOf[holder];
            balances[i] = balance;
        }

        return (holders, balances);
    }

    /// Get all addresses who have ever held the token
    /// @return The holders
    /// @notice Some holders may have a zero balance
    function getHolders() public view returns (address[] memory) {
        return holders;
    }

    /// Get the number of all addresses who have ever held the token
    /// @return The number of holders
    /// @notice Some holders may have a zero balance
    function getHoldersLength() public view returns (uint256) {
        return holders.length;
    }
}

File 2 of 10 : WenFoundry.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.25;

import { ReentrancyGuard } from "solmate/utils/ReentrancyGuard.sol";
import { FixedPointMathLib } from "solmate/utils/FixedPointMathLib.sol";
import { SafeTransferLib } from "solmate/utils/SafeTransferLib.sol";
import { WenToken } from "./WenToken.sol";
import { WenHeadmaster } from "./WenHeadmaster.sol";
import { WenLedger } from "./WenLedger.sol";

error InsufficientOutput();
error InsufficientTokenReserve();
error InsufficientEthReserve();
error InsufficientMcap();
error TooMuchMcap();
error AlreadyGraduated();
error DeadlineExceeded();
error InvalidAmountIn();
error Forbidden();
error FeeTooHigh();
error Paused();

/// @title The Wen protocol singleton AMM with a custom bonding curve built-in.
/// @author strobie <@0xstrobe>
/// @notice Owner can pause trading, set fees, and set the graduation strategy, but cannot withdraw funds or modify the bonding curve.
contract WenFoundry is ReentrancyGuard {
    using FixedPointMathLib for uint256;

    struct Pool {
        WenToken token;
        uint256 tokenReserve;
        uint256 virtualTokenReserve;
        uint256 ethReserve;
        uint256 virtualEthReserve;
        uint256 lastPrice;
        uint256 lastMcapInEth;
        uint256 lastTimestamp;
        uint256 lastBlock;
        address creator;
        address headmaster;
        // poolId is not limited to address to support non-uniswap styled AMMs
        uint256 poolId;
    }

    uint8 public constant DECIMALS = 18;
    uint256 public constant FEE_DENOMINATOR = 10000;
    uint256 public constant MAX_FEE = 1000; // 10%
    uint256 public feeRate_ = 100; // 1%

    uint256 public constant INIT_VIRTUAL_TOKEN_RESERVE = 1073000000 ether;
    uint256 public constant INIT_REAL_TOKEN_RESERVE = 793100000 ether;
    uint256 public constant TOTAL_SUPPLY = 1000000000 ether;
    uint256 public initVirtualEthReserve_;
    uint256 public graduationThreshold_;
    uint256 public K_;

    mapping(WenToken => Pool) public pools_;
    WenLedger public immutable wenLedger_;

    uint256 public creationFee_ = 0;
    uint256 public graduationFeeRate_ = 700;
    address public feeTo_;
    bool public paused_;
    WenHeadmaster public headmaster_; // the contract which implements the graduation logic

    /*//////////////////////////////////////////////////
    /////////////   PERMISSIONED METHODS   /////////////
    //////////////////////////////////////////////////*/

    address public owner_;

    modifier onlyOwner() {
        if (msg.sender != owner_) revert Forbidden();
        _;
    }

    function setFeeTo(address feeTo) external onlyOwner {
        feeTo_ = feeTo;
    }

    function setFeeRate(uint256 feeRate) external onlyOwner {
        if (feeRate > MAX_FEE) revert FeeTooHigh();
        feeRate_ = feeRate;
    }

    function setGraduationFeeRate(uint256 feeRate) external onlyOwner {
        if (feeRate > MAX_FEE) revert FeeTooHigh();
        graduationFeeRate_ = feeRate;
    }

    function setInitVirtualEthReserve(uint256 initVirtualEthReserve) external onlyOwner {
        initVirtualEthReserve_ = initVirtualEthReserve;
        K_ = initVirtualEthReserve_ * INIT_VIRTUAL_TOKEN_RESERVE;
        graduationThreshold_ = K_ / (INIT_VIRTUAL_TOKEN_RESERVE - INIT_REAL_TOKEN_RESERVE) - initVirtualEthReserve_;
    }

    function setCreationFee(uint256 fee) external onlyOwner {
        creationFee_ = fee;
    }

    function setHeadmaster(WenHeadmaster headmaster) external onlyOwner {
        headmaster_ = headmaster;
    }

    function setOwner(address owner) external onlyOwner {
        owner_ = owner;
    }

    function setPaused(bool paused) external onlyOwner {
        paused_ = paused;
    }

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

    constructor(uint256 initVirtualEthReserve) {
        feeTo_ = msg.sender;
        owner_ = msg.sender;
        paused_ = false;

        wenLedger_ = new WenLedger();
        initVirtualEthReserve_ = initVirtualEthReserve;
        K_ = initVirtualEthReserve_ * INIT_VIRTUAL_TOKEN_RESERVE;
        graduationThreshold_ = K_ / (INIT_VIRTUAL_TOKEN_RESERVE - INIT_REAL_TOKEN_RESERVE) - initVirtualEthReserve_;
    }

    /*//////////////////////////////////////////////////
    //////////////////   ASSERTIONS   //////////////////
    //////////////////////////////////////////////////*/

    modifier checkDeadline(uint256 deadline) {
        if (block.timestamp > deadline) revert DeadlineExceeded();
        _;
    }

    modifier onlyUnpaused() {
        if (paused_) revert Paused();
        _;
    }

    modifier onlyUngraduated(WenToken token) {
        if (pools_[token].headmaster != address(0)) revert AlreadyGraduated();
        if (pools_[token].ethReserve > graduationThreshold_) revert TooMuchMcap();
        _;
    }

    function _isMcapGraduable(WenToken token) private view returns (bool) {
        return pools_[token].ethReserve >= graduationThreshold_;
    }

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

    event TokenCreated(WenToken indexed token, address indexed creator);
    event TokenGraduated(WenToken indexed token, WenHeadmaster indexed headmaster, uint256 indexed poolId, uint256 amountToken, uint256 amountETH);
    event Buy(WenToken indexed token, address indexed sender, uint256 amountIn, uint256 amountOut, address indexed to);
    event Sell(WenToken indexed token, address indexed sender, uint256 amountIn, uint256 amountOut, address indexed to);
    event PriceUpdate(WenToken indexed token, address indexed sender, uint256 price, uint256 mcapInEth);

    /*//////////////////////////////////////////////////
    ////////////////   POOL FUNCTIONS   ////////////////
    //////////////////////////////////////////////////*/

    /// @notice Creates a new token in the WenFoundry.
    /// @param name The name of the token.
    /// @param symbol The symbol of the token.
    /// @param initAmountIn The initial amount of ETH to swap for the token.
    /// @param description The description of the token.
    /// @param extended The extended description of the token, typically a JSON string.
    /// @return token The newly created token.
    /// @return amountOut The output amount of token the creator received.
    function createToken(string memory name, string memory symbol, uint256 initAmountIn, string memory description, string memory extended)
        external
        payable
        onlyUnpaused
        returns (WenToken token, uint256 amountOut)
    {
        if (msg.value != initAmountIn + creationFee_) revert InvalidAmountIn();
        if (creationFee_ > 0) {
            SafeTransferLib.safeTransferETH(feeTo_, creationFee_);
        }

        token = _deployToken(name, symbol, description, extended);
        if (initAmountIn > 0) {
            amountOut = _swapEthForTokens(token, initAmountIn, 0, msg.sender);
        }
    }

    function _deployToken(string memory name, string memory symbol, string memory description, string memory extended) private returns (WenToken) {
        WenToken token = new WenToken(name, symbol, DECIMALS, TOTAL_SUPPLY, description, extended, address(this), msg.sender);

        Pool storage pool = pools_[token];
        pool.token = token;
        pool.tokenReserve = INIT_REAL_TOKEN_RESERVE;
        pool.virtualTokenReserve = INIT_VIRTUAL_TOKEN_RESERVE;
        pool.ethReserve = 0;
        pool.virtualEthReserve = initVirtualEthReserve_;
        pool.lastPrice = initVirtualEthReserve_.divWadDown(INIT_VIRTUAL_TOKEN_RESERVE);
        pool.lastMcapInEth = TOTAL_SUPPLY.mulWadUp(pool.lastPrice);
        pool.lastTimestamp = block.timestamp;
        pool.lastBlock = block.number;
        pool.creator = msg.sender;

        emit TokenCreated(token, msg.sender);
        emit PriceUpdate(token, msg.sender, pool.lastPrice, pool.lastMcapInEth);
        wenLedger_.addCreation(token, msg.sender);

        return token;
    }

    function _graduate(WenToken token) private {
        pools_[token].lastTimestamp = block.timestamp;
        pools_[token].lastBlock = block.number;

        uint256 fee = pools_[token].ethReserve * graduationFeeRate_ / FEE_DENOMINATOR;
        SafeTransferLib.safeTransferETH(feeTo_, fee);
        uint256 _amountETH = pools_[token].ethReserve - fee;
        uint256 _amountToken = TOTAL_SUPPLY - INIT_REAL_TOKEN_RESERVE;

        WenToken(address(token)).setIsApprovable(true);
        token.approve(address(headmaster_), type(uint256).max);
        (uint256 poolId, uint256 amountToken, uint256 amountETH) = headmaster_.execute{ value: _amountETH }(token, _amountToken, _amountETH);

        pools_[token].headmaster = address(headmaster_);
        pools_[token].poolId = poolId;
        pools_[token].virtualTokenReserve = 0;
        pools_[token].virtualEthReserve = 0;
        pools_[token].tokenReserve = 0;
        pools_[token].ethReserve = 0;

        emit TokenGraduated(token, headmaster_, poolId, amountToken, amountETH);
        wenLedger_.addGraduation(token, amountETH);
    }

    /*//////////////////////////////////////////////////
    ////////////////   SWAP FUNCTIONS   ////////////////
    //////////////////////////////////////////////////*/

    /// @notice Swaps ETH for tokens.
    /// @param token The token to swap.
    /// @param amountIn Input amount of ETH.
    /// @param amountOutMin Minimum output amount of token.
    /// @param to Recipient of token.
    /// @param deadline Deadline for the swap.
    /// @return amountOut The actual output amount of token.
    function swapEthForTokens(WenToken token, uint256 amountIn, uint256 amountOutMin, address to, uint256 deadline)
        external
        payable
        nonReentrant
        onlyUnpaused
        onlyUngraduated(token)
        checkDeadline(deadline)
        returns (uint256 amountOut)
    {
        if (msg.value != amountIn) revert InvalidAmountIn();

        amountOut = _swapEthForTokens(token, amountIn, amountOutMin, to);

        if (_isMcapGraduable(token)) {
            _graduate(token);
        }
    }

    function _swapEthForTokens(WenToken token, uint256 amountIn, uint256 amountOutMin, address to) private returns (uint256 amountOut) {
        if (amountIn == 0) revert InvalidAmountIn();

        uint256 fee = amountIn * feeRate_ / FEE_DENOMINATOR;
        SafeTransferLib.safeTransferETH(feeTo_, fee);
        amountIn -= fee;

        uint256 newVirtualEthReserve = pools_[token].virtualEthReserve + amountIn;
        uint256 newVirtualTokenReserve = K_ / newVirtualEthReserve;
        amountOut = pools_[token].virtualTokenReserve - newVirtualTokenReserve;

        if (amountOut > pools_[token].tokenReserve) {
            amountOut = pools_[token].tokenReserve;
        }
        if (amountOut < amountOutMin) revert InsufficientOutput();

        pools_[token].virtualTokenReserve = newVirtualTokenReserve;
        pools_[token].virtualEthReserve = newVirtualEthReserve;

        pools_[token].lastPrice = newVirtualEthReserve.divWadDown(newVirtualTokenReserve);
        pools_[token].lastMcapInEth = TOTAL_SUPPLY.mulWadUp(pools_[token].lastPrice);
        pools_[token].lastTimestamp = block.timestamp;
        pools_[token].lastBlock = block.number;

        pools_[token].ethReserve += amountIn;
        pools_[token].tokenReserve -= amountOut;

        SafeTransferLib.safeTransfer(token, to, amountOut);

        emit Buy(token, msg.sender, amountIn + fee, amountOut, to);
        emit PriceUpdate(token, msg.sender, pools_[token].lastPrice, pools_[token].lastMcapInEth);
        WenLedger.Trade memory trade = WenLedger.Trade(token, msg.sender, amountIn + fee, amountOut, true, uint128(block.timestamp), uint128(block.number));
        wenLedger_.addTrade(trade);
    }

    /// @notice Swaps tokens for ETH.
    /// @param token The token to swap.
    /// @param amountIn Input amount of token.
    /// @param amountOutMin Minimum output amount of ETH.
    /// @param to Recipient of ETH.
    /// @param deadline Deadline for the swap.
    /// @return amountOut The actual output amount of ETH.
    function swapTokensForEth(WenToken token, uint256 amountIn, uint256 amountOutMin, address to, uint256 deadline)
        external
        nonReentrant
        onlyUnpaused
        onlyUngraduated(token)
        checkDeadline(deadline)
        returns (uint256 amountOut)
    {
        if (amountIn == 0) revert InvalidAmountIn();

        SafeTransferLib.safeTransferFrom(token, msg.sender, address(this), amountIn);

        uint256 newVirtualTokenReserve = pools_[token].virtualTokenReserve + amountIn;
        uint256 newVirtualEthReserve = K_ / newVirtualTokenReserve;
        amountOut = pools_[token].virtualEthReserve - newVirtualEthReserve;

        pools_[token].virtualTokenReserve = newVirtualTokenReserve;
        pools_[token].virtualEthReserve = newVirtualEthReserve;

        pools_[token].lastPrice = newVirtualEthReserve.divWadDown(newVirtualTokenReserve);
        pools_[token].lastMcapInEth = TOTAL_SUPPLY.mulWadUp(pools_[token].lastPrice);
        pools_[token].lastTimestamp = block.timestamp;
        pools_[token].lastBlock = block.number;

        pools_[token].tokenReserve += amountIn;
        pools_[token].ethReserve -= amountOut;

        uint256 fee = amountOut * feeRate_ / FEE_DENOMINATOR;
        amountOut -= fee;

        if (amountOut < amountOutMin) revert InsufficientOutput();
        SafeTransferLib.safeTransferETH(feeTo_, fee);
        SafeTransferLib.safeTransferETH(to, amountOut);

        emit Sell(token, msg.sender, amountIn, amountOut, to);
        emit PriceUpdate(token, msg.sender, pools_[token].lastPrice, pools_[token].lastMcapInEth);
        WenLedger.Trade memory trade = WenLedger.Trade(token, msg.sender, amountIn, amountOut + fee, false, uint128(block.timestamp), uint128(block.number));
        wenLedger_.addTrade(trade);
    }

    /*//////////////////////////////////////////////////
    ////////////////   VIEW FUNCTIONS   ////////////////
    //////////////////////////////////////////////////*/

    /// @notice Calculates the expected output amount of ETH given an input amount of token.
    /// @param token The token to swap.
    /// @param amountIn Input amount of token.
    /// @return amountOut The expected output amount of ETH.
    function calcAmountOutFromToken(WenToken token, uint256 amountIn) external view returns (uint256 amountOut) {
        if (amountIn == 0) revert InvalidAmountIn();

        uint256 newVirtualTokenReserve = pools_[token].virtualTokenReserve + amountIn;
        uint256 newVirtualEthReserve = K_ / newVirtualTokenReserve;
        amountOut = pools_[token].virtualEthReserve - newVirtualEthReserve;

        uint256 fee = amountOut * feeRate_ / FEE_DENOMINATOR;
        amountOut -= fee;
    }

    /// @notice Calculates the expected output amount of token given an input amount of ETH.
    /// @param token The token to swap.
    /// @param amountIn Input amount of ETH.
    /// @return amountOut The expected output amount of token.
    function calcAmountOutFromEth(WenToken token, uint256 amountIn) external view returns (uint256 amountOut) {
        if (amountIn == 0) revert InvalidAmountIn();

        uint256 fee = amountIn * feeRate_ / FEE_DENOMINATOR;
        amountIn -= fee;

        uint256 newVirtualEthReserve = pools_[token].virtualEthReserve + amountIn;
        uint256 newVirtualTokenReserve = K_ / newVirtualEthReserve;
        amountOut = pools_[token].virtualTokenReserve - newVirtualTokenReserve;

        if (amountOut > pools_[token].tokenReserve) {
            amountOut = pools_[token].tokenReserve;
        }
    }

    /*///////////////////////////////////////////
    //             Storage  Getters            //
    ///////////////////////////////////////////*/

    function getPool(WenToken token) external view returns (Pool memory) {
        return pools_[token];
    }

    function getPoolsAll() external view returns (Pool[] memory) {
        WenToken[] memory tokens = wenLedger_.getTokens();
        Pool[] memory pools = new Pool[](tokens.length);

        for (uint256 i = 0; i < tokens.length; i++) {
            pools[i] = pools_[tokens[i]];
        }

        return pools;
    }
}

File 3 of 10 : ReentrancyGuard.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

/// @notice Gas optimized reentrancy protection for smart contracts.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/ReentrancyGuard.sol)
/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol)
abstract contract ReentrancyGuard {
    uint256 private locked = 1;

    modifier nonReentrant() virtual {
        require(locked == 1, "REENTRANCY");

        locked = 2;

        _;

        locked = 1;
    }
}

File 4 of 10 : FixedPointMathLib.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

/// @notice Arithmetic library with operations for fixed-point numbers.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/FixedPointMathLib.sol)
/// @author Inspired by USM (https://github.com/usmfum/USM/blob/master/contracts/WadMath.sol)
library FixedPointMathLib {
    /*//////////////////////////////////////////////////////////////
                    SIMPLIFIED FIXED POINT OPERATIONS
    //////////////////////////////////////////////////////////////*/

    uint256 internal constant MAX_UINT256 = 2**256 - 1;

    uint256 internal constant WAD = 1e18; // The scalar of ETH and most ERC20s.

    function mulWadDown(uint256 x, uint256 y) internal pure returns (uint256) {
        return mulDivDown(x, y, WAD); // Equivalent to (x * y) / WAD rounded down.
    }

    function mulWadUp(uint256 x, uint256 y) internal pure returns (uint256) {
        return mulDivUp(x, y, WAD); // Equivalent to (x * y) / WAD rounded up.
    }

    function divWadDown(uint256 x, uint256 y) internal pure returns (uint256) {
        return mulDivDown(x, WAD, y); // Equivalent to (x * WAD) / y rounded down.
    }

    function divWadUp(uint256 x, uint256 y) internal pure returns (uint256) {
        return mulDivUp(x, WAD, y); // Equivalent to (x * WAD) / y rounded up.
    }

    /*//////////////////////////////////////////////////////////////
                    LOW LEVEL FIXED POINT OPERATIONS
    //////////////////////////////////////////////////////////////*/

    function mulDivDown(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 z) {
        /// @solidity memory-safe-assembly
        assembly {
            // Equivalent to require(denominator != 0 && (y == 0 || x <= type(uint256).max / y))
            if iszero(mul(denominator, iszero(mul(y, gt(x, div(MAX_UINT256, y)))))) {
                revert(0, 0)
            }

            // Divide x * y by the denominator.
            z := div(mul(x, y), denominator)
        }
    }

    function mulDivUp(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 z) {
        /// @solidity memory-safe-assembly
        assembly {
            // Equivalent to require(denominator != 0 && (y == 0 || x <= type(uint256).max / y))
            if iszero(mul(denominator, iszero(mul(y, gt(x, div(MAX_UINT256, y)))))) {
                revert(0, 0)
            }

            // If x * y modulo the denominator is strictly greater than 0,
            // 1 is added to round up the division of x * y by the denominator.
            z := add(gt(mod(mul(x, y), denominator), 0), div(mul(x, y), denominator))
        }
    }

    function rpow(
        uint256 x,
        uint256 n,
        uint256 scalar
    ) internal pure returns (uint256 z) {
        /// @solidity memory-safe-assembly
        assembly {
            switch x
            case 0 {
                switch n
                case 0 {
                    // 0 ** 0 = 1
                    z := scalar
                }
                default {
                    // 0 ** n = 0
                    z := 0
                }
            }
            default {
                switch mod(n, 2)
                case 0 {
                    // If n is even, store scalar in z for now.
                    z := scalar
                }
                default {
                    // If n is odd, store x in z for now.
                    z := x
                }

                // Shifting right by 1 is like dividing by 2.
                let half := shr(1, scalar)

                for {
                    // Shift n right by 1 before looping to halve it.
                    n := shr(1, n)
                } n {
                    // Shift n right by 1 each iteration to halve it.
                    n := shr(1, n)
                } {
                    // Revert immediately if x ** 2 would overflow.
                    // Equivalent to iszero(eq(div(xx, x), x)) here.
                    if shr(128, x) {
                        revert(0, 0)
                    }

                    // Store x squared.
                    let xx := mul(x, x)

                    // Round to the nearest number.
                    let xxRound := add(xx, half)

                    // Revert if xx + half overflowed.
                    if lt(xxRound, xx) {
                        revert(0, 0)
                    }

                    // Set x to scaled xxRound.
                    x := div(xxRound, scalar)

                    // If n is even:
                    if mod(n, 2) {
                        // Compute z * x.
                        let zx := mul(z, x)

                        // If z * x overflowed:
                        if iszero(eq(div(zx, x), z)) {
                            // Revert if x is non-zero.
                            if iszero(iszero(x)) {
                                revert(0, 0)
                            }
                        }

                        // Round to the nearest number.
                        let zxRound := add(zx, half)

                        // Revert if zx + half overflowed.
                        if lt(zxRound, zx) {
                            revert(0, 0)
                        }

                        // Return properly scaled zxRound.
                        z := div(zxRound, scalar)
                    }
                }
            }
        }
    }

    /*//////////////////////////////////////////////////////////////
                        GENERAL NUMBER UTILITIES
    //////////////////////////////////////////////////////////////*/

    function sqrt(uint256 x) internal pure returns (uint256 z) {
        /// @solidity memory-safe-assembly
        assembly {
            let y := x // We start y at x, which will help us make our initial estimate.

            z := 181 // The "correct" value is 1, but this saves a multiplication later.

            // This segment is to get a reasonable initial estimate for the Babylonian method. With a bad
            // start, the correct # of bits increases ~linearly each iteration instead of ~quadratically.

            // We check y >= 2^(k + 8) but shift right by k bits
            // each branch to ensure that if x >= 256, then y >= 256.
            if iszero(lt(y, 0x10000000000000000000000000000000000)) {
                y := shr(128, y)
                z := shl(64, z)
            }
            if iszero(lt(y, 0x1000000000000000000)) {
                y := shr(64, y)
                z := shl(32, z)
            }
            if iszero(lt(y, 0x10000000000)) {
                y := shr(32, y)
                z := shl(16, z)
            }
            if iszero(lt(y, 0x1000000)) {
                y := shr(16, y)
                z := shl(8, z)
            }

            // Goal was to get z*z*y within a small factor of x. More iterations could
            // get y in a tighter range. Currently, we will have y in [256, 256*2^16).
            // We ensured y >= 256 so that the relative difference between y and y+1 is small.
            // That's not possible if x < 256 but we can just verify those cases exhaustively.

            // Now, z*z*y <= x < z*z*(y+1), and y <= 2^(16+8), and either y >= 256, or x < 256.
            // Correctness can be checked exhaustively for x < 256, so we assume y >= 256.
            // Then z*sqrt(y) is within sqrt(257)/sqrt(256) of sqrt(x), or about 20bps.

            // For s in the range [1/256, 256], the estimate f(s) = (181/1024) * (s+1) is in the range
            // (1/2.84 * sqrt(s), 2.84 * sqrt(s)), with largest error when s = 1 and when s = 256 or 1/256.

            // Since y is in [256, 256*2^16), let a = y/65536, so that a is in [1/256, 256). Then we can estimate
            // sqrt(y) using sqrt(65536) * 181/1024 * (a + 1) = 181/4 * (y + 65536)/65536 = 181 * (y + 65536)/2^18.

            // There is no overflow risk here since y < 2^136 after the first branch above.
            z := shr(18, mul(z, add(y, 65536))) // A mul() is saved from starting z at 181.

            // Given the worst case multiplicative error of 2.84 above, 7 iterations should be enough.
            z := shr(1, add(z, div(x, z)))
            z := shr(1, add(z, div(x, z)))
            z := shr(1, add(z, div(x, z)))
            z := shr(1, add(z, div(x, z)))
            z := shr(1, add(z, div(x, z)))
            z := shr(1, add(z, div(x, z)))
            z := shr(1, add(z, div(x, z)))

            // If x+1 is a perfect square, the Babylonian method cycles between
            // floor(sqrt(x)) and ceil(sqrt(x)). This statement ensures we return floor.
            // See: https://en.wikipedia.org/wiki/Integer_square_root#Using_only_integer_division
            // Since the ceil is rare, we save gas on the assignment and repeat division in the rare case.
            // If you don't care whether the floor or ceil square root is returned, you can remove this statement.
            z := sub(z, lt(div(x, z), z))
        }
    }

    function unsafeMod(uint256 x, uint256 y) internal pure returns (uint256 z) {
        /// @solidity memory-safe-assembly
        assembly {
            // Mod x by y. Note this will return
            // 0 instead of reverting if y is zero.
            z := mod(x, y)
        }
    }

    function unsafeDiv(uint256 x, uint256 y) internal pure returns (uint256 r) {
        /// @solidity memory-safe-assembly
        assembly {
            // Divide x by y. Note this will return
            // 0 instead of reverting if y is zero.
            r := div(x, y)
        }
    }

    function unsafeDivUp(uint256 x, uint256 y) internal pure returns (uint256 z) {
        /// @solidity memory-safe-assembly
        assembly {
            // Add 1 to x * y if x % y > 0. Note this will
            // return 0 instead of reverting if y is zero.
            z := add(gt(mod(x, y), 0), div(x, y))
        }
    }
}

File 5 of 10 : SafeTransferLib.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

import {ERC20} from "../tokens/ERC20.sol";

/// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/SafeTransferLib.sol)
/// @dev Use with caution! Some functions in this library knowingly create dirty bits at the destination of the free memory pointer.
/// @dev Note that none of the functions in this library check that a token has code at all! That responsibility is delegated to the caller.
library SafeTransferLib {
    /*//////////////////////////////////////////////////////////////
                             ETH OPERATIONS
    //////////////////////////////////////////////////////////////*/

    function safeTransferETH(address to, uint256 amount) internal {
        bool success;

        /// @solidity memory-safe-assembly
        assembly {
            // Transfer the ETH and store if it succeeded or not.
            success := call(gas(), to, amount, 0, 0, 0, 0)
        }

        require(success, "ETH_TRANSFER_FAILED");
    }

    /*//////////////////////////////////////////////////////////////
                            ERC20 OPERATIONS
    //////////////////////////////////////////////////////////////*/

    function safeTransferFrom(
        ERC20 token,
        address from,
        address to,
        uint256 amount
    ) internal {
        bool success;

        /// @solidity memory-safe-assembly
        assembly {
            // Get a pointer to some free memory.
            let freeMemoryPointer := mload(0x40)

            // Write the abi-encoded calldata into memory, beginning with the function selector.
            mstore(freeMemoryPointer, 0x23b872dd00000000000000000000000000000000000000000000000000000000)
            mstore(add(freeMemoryPointer, 4), and(from, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "from" argument.
            mstore(add(freeMemoryPointer, 36), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument.
            mstore(add(freeMemoryPointer, 68), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type.

            success := and(
                // Set success to whether the call reverted, if not we check it either
                // returned exactly 1 (can't just be non-zero data), or had no return data.
                or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),
                // We use 100 because the length of our calldata totals up like so: 4 + 32 * 3.
                // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.
                // Counterintuitively, this call must be positioned second to the or() call in the
                // surrounding and() call or else returndatasize() will be zero during the computation.
                call(gas(), token, 0, freeMemoryPointer, 100, 0, 32)
            )
        }

        require(success, "TRANSFER_FROM_FAILED");
    }

    function safeTransfer(
        ERC20 token,
        address to,
        uint256 amount
    ) internal {
        bool success;

        /// @solidity memory-safe-assembly
        assembly {
            // Get a pointer to some free memory.
            let freeMemoryPointer := mload(0x40)

            // Write the abi-encoded calldata into memory, beginning with the function selector.
            mstore(freeMemoryPointer, 0xa9059cbb00000000000000000000000000000000000000000000000000000000)
            mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument.
            mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type.

            success := and(
                // Set success to whether the call reverted, if not we check it either
                // returned exactly 1 (can't just be non-zero data), or had no return data.
                or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),
                // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2.
                // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.
                // Counterintuitively, this call must be positioned second to the or() call in the
                // surrounding and() call or else returndatasize() will be zero during the computation.
                call(gas(), token, 0, freeMemoryPointer, 68, 0, 32)
            )
        }

        require(success, "TRANSFER_FAILED");
    }

    function safeApprove(
        ERC20 token,
        address to,
        uint256 amount
    ) internal {
        bool success;

        /// @solidity memory-safe-assembly
        assembly {
            // Get a pointer to some free memory.
            let freeMemoryPointer := mload(0x40)

            // Write the abi-encoded calldata into memory, beginning with the function selector.
            mstore(freeMemoryPointer, 0x095ea7b300000000000000000000000000000000000000000000000000000000)
            mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument.
            mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type.

            success := and(
                // Set success to whether the call reverted, if not we check it either
                // returned exactly 1 (can't just be non-zero data), or had no return data.
                or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),
                // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2.
                // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.
                // Counterintuitively, this call must be positioned second to the or() call in the
                // surrounding and() call or else returndatasize() will be zero during the computation.
                call(gas(), token, 0, freeMemoryPointer, 68, 0, 32)
            )
        }

        require(success, "APPROVE_FAILED");
    }
}

File 6 of 10 : WenHeadmaster.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.25;

import { SafeTransferLib } from "solmate/utils/SafeTransferLib.sol";
import { IUniswapV2Router02 } from "./interfaces/IUniswapV2Router02.sol";
import { IUniswapV2Factory } from "./interfaces/IUniswapV2Factory.sol";
import { WenToken } from "./WenToken.sol";
import { WenFoundry } from "./WenFoundry.sol";

error Forbidden();
error InvalidAmountToken();
error InvalidAmountEth();

/// @title A Wen protocol graduation strategy for bootstrapping liquidity on uni-v2 AMMs.
/// @author strobie <@0xstrobe>
/// @notice This contract may be replaced by other strategies in the future.
contract WenHeadmaster {
    WenFoundry public immutable wenFoundry;
    IUniswapV2Router02 public immutable uniswapV2Router02;
    IUniswapV2Factory public immutable uniswapV2Factory;

    address public constant liquidityOwner = address(0);

    WenToken[] public alumni;

    constructor(WenFoundry _wenFoundry, IUniswapV2Router02 _uniswapV2Router02) {
        wenFoundry = _wenFoundry;
        uniswapV2Router02 = IUniswapV2Router02(payable(_uniswapV2Router02));
        uniswapV2Factory = IUniswapV2Factory(uniswapV2Router02.factory());
    }

    modifier onlyWenFoundry() {
        if (msg.sender != address(wenFoundry)) revert Forbidden();
        _;
    }

    event Executed(WenToken token, uint256 indexed poolId, uint256 amountToken, uint256 amountETH, address indexed owner);

    function execute(WenToken token, uint256 amountToken, uint256 amountEth)
        external
        payable
        onlyWenFoundry
        returns (uint256 poolId, uint256 _amountToken, uint256 _amountETH)
    {
        if (amountToken == 0) revert InvalidAmountToken();
        if (amountEth == 0 || msg.value != amountEth) revert InvalidAmountEth();

        SafeTransferLib.safeTransferFrom(token, msg.sender, address(this), amountToken);
        SafeTransferLib.safeApprove(token, address(uniswapV2Router02), amountToken);

        address pair = uniswapV2Factory.createPair(address(token), uniswapV2Router02.WETH());
        poolId = uint256(uint160(pair));
        (_amountToken, _amountETH,) = uniswapV2Router02.addLiquidityETH{ value: amountEth }(address(token), amountToken, 0, 0, liquidityOwner, block.timestamp);

        alumni.push(token);

        emit Executed(token, poolId, _amountToken, _amountETH, liquidityOwner);
    }

    /*///////////////////////////////////////////
    //             Storage  Getters            //
    ///////////////////////////////////////////*/

    function getAlumni() external view returns (WenToken[] memory) {
        return alumni;
    }
}

File 7 of 10 : WenLedger.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.25;

import { WenFoundry } from "./WenFoundry.sol";
import { WenToken } from "./WenToken.sol";

error NotFoundry();

/// @title The Wen protocol user activity bookkeeper.
/// @author strobie <@0xstrobe>
/// @notice Since this version of the protocol is not deployed on gas-expensive networks, this contract is designed to make data more available from onchain.
/// @dev The view functions are intended for frontend usage with limit <<< n instead of limit ≈ n, so the sorting algos are effectively O(n).
contract WenLedger {
    struct Stats {
        uint256 totalVolume;
        uint256 totalLiquidityBootstrapped;
        uint256 totalTokensCreated;
        uint256 totalTokensGraduated;
        uint256 totalTrades;
    }

    struct Trade {
        WenToken token;
        address maker;
        uint256 amountIn;
        uint256 amountOut;
        bool isBuy;
        uint128 timestamp;
        uint128 blockNumber;
    }

    uint256 public totalVolume;
    uint256 public totalLiquidityBootstrapped;

    mapping(address => WenToken[]) public tokensCreatedBy;
    mapping(address => WenToken[]) public tokensTradedBy;
    mapping(WenToken => mapping(address => bool)) public hasTraded;

    WenToken[] public tokensCreated;
    WenToken[] public tokensGraduated;
    mapping(WenToken => bool) public isGraduated;

    Trade[] public trades;
    mapping(WenToken => uint256[]) public tradesByToken;
    mapping(address => uint256[]) public tradesByUser;

    WenFoundry public immutable wenFoundry;

    constructor() {
        wenFoundry = WenFoundry(msg.sender);
    }

    modifier onlyFoundry() {
        if (msg.sender != address(wenFoundry)) revert NotFoundry();
        _;
    }

    /// Add a token to the list of tokens created by a user
    /// @param token The token to add
    /// @param user The user to add the token for
    /// @notice This method should only be called once per token creation
    function addCreation(WenToken token, address user) public onlyFoundry {
        tokensCreatedBy[user].push(token);
        tokensCreated.push(token);
    }

    /// Add a trade to the ledger
    /// @param trade The trade to add
    function addTrade(Trade memory trade) public onlyFoundry {
        uint256 tradeId = trades.length;
        trades.push(trade);
        tradesByToken[trade.token].push(tradeId);
        tradesByUser[trade.maker].push(tradeId);
        totalVolume += trade.isBuy ? trade.amountIn : trade.amountOut;

        if (hasTraded[trade.token][trade.maker]) return;

        tokensTradedBy[trade.maker].push(trade.token);
        hasTraded[trade.token][trade.maker] = true;
    }

    /// Add a token to the list of graduated tokens
    /// @param token The token to add
    /// @notice This method should only be called once per token graduation
    function addGraduation(WenToken token, uint256 amountEth) public onlyFoundry {
        tokensGraduated.push(token);
        isGraduated[token] = true;
        totalLiquidityBootstrapped += amountEth;
    }

    /*///////////////////////////////////////////
    //             Storage  Getters            //
    ///////////////////////////////////////////*/

    function getTokensCreatedBy(address user) public view returns (WenToken[] memory) {
        return tokensCreatedBy[user];
    }

    function getTokensTradedBy(address user) public view returns (WenToken[] memory) {
        return tokensTradedBy[user];
    }

    function getTokens() public view returns (WenToken[] memory) {
        return tokensCreated;
    }

    function getToken(uint256 tokenId) public view returns (WenToken) {
        return tokensCreated[tokenId];
    }

    function getTokensLength() public view returns (uint256) {
        return tokensCreated.length;
    }

    function getTokensGraduated() public view returns (WenToken[] memory) {
        return tokensGraduated;
    }

    function getTokenGraduated(uint256 tokenId) public view returns (WenToken) {
        return tokensGraduated[tokenId];
    }

    function getTokensGraduatedLength() public view returns (uint256) {
        return tokensGraduated.length;
    }

    function getTradesAll() public view returns (Trade[] memory) {
        return trades;
    }

    function getTrade(uint256 tradeId) public view returns (Trade memory) {
        return trades[tradeId];
    }

    function getTradesLength() public view returns (uint256) {
        return trades.length;
    }

    function getTradesByTokenLength(WenToken token) public view returns (uint256) {
        return tradesByToken[token].length;
    }

    function getTradeIdsByToken(WenToken token) public view returns (uint256[] memory) {
        return tradesByToken[token];
    }

    function getTradesByUserLength(address user) public view returns (uint256) {
        return tradesByUser[user].length;
    }

    function getTradeIdsByUser(address user) public view returns (uint256[] memory) {
        return tradesByUser[user];
    }

    function getStats() public view returns (Stats memory) {
        return Stats({
            totalVolume: totalVolume,
            totalLiquidityBootstrapped: totalLiquidityBootstrapped,
            totalTokensCreated: tokensCreated.length,
            totalTokensGraduated: tokensGraduated.length,
            totalTrades: trades.length
        });
    }
}

File 8 of 10 : ERC20.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC20.sol)
/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)
/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it.
abstract contract ERC20 {
    /*//////////////////////////////////////////////////////////////
                                 EVENTS
    //////////////////////////////////////////////////////////////*/

    event Transfer(address indexed from, address indexed to, uint256 amount);

    event Approval(address indexed owner, address indexed spender, uint256 amount);

    /*//////////////////////////////////////////////////////////////
                            METADATA STORAGE
    //////////////////////////////////////////////////////////////*/

    string public name;

    string public symbol;

    uint8 public immutable decimals;

    /*//////////////////////////////////////////////////////////////
                              ERC20 STORAGE
    //////////////////////////////////////////////////////////////*/

    uint256 public totalSupply;

    mapping(address => uint256) public balanceOf;

    mapping(address => mapping(address => uint256)) public allowance;

    /*//////////////////////////////////////////////////////////////
                            EIP-2612 STORAGE
    //////////////////////////////////////////////////////////////*/

    uint256 internal immutable INITIAL_CHAIN_ID;

    bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;

    mapping(address => uint256) public nonces;

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

    constructor(
        string memory _name,
        string memory _symbol,
        uint8 _decimals
    ) {
        name = _name;
        symbol = _symbol;
        decimals = _decimals;

        INITIAL_CHAIN_ID = block.chainid;
        INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator();
    }

    /*//////////////////////////////////////////////////////////////
                               ERC20 LOGIC
    //////////////////////////////////////////////////////////////*/

    function approve(address spender, uint256 amount) public virtual returns (bool) {
        allowance[msg.sender][spender] = amount;

        emit Approval(msg.sender, spender, amount);

        return true;
    }

    function transfer(address to, uint256 amount) public virtual returns (bool) {
        balanceOf[msg.sender] -= amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(msg.sender, to, amount);

        return true;
    }

    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual returns (bool) {
        uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals.

        if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount;

        balanceOf[from] -= amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(from, to, amount);

        return true;
    }

    /*//////////////////////////////////////////////////////////////
                             EIP-2612 LOGIC
    //////////////////////////////////////////////////////////////*/

    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public virtual {
        require(deadline >= block.timestamp, "PERMIT_DEADLINE_EXPIRED");

        // Unchecked because the only math done is incrementing
        // the owner's nonce which cannot realistically overflow.
        unchecked {
            address recoveredAddress = ecrecover(
                keccak256(
                    abi.encodePacked(
                        "\x19\x01",
                        DOMAIN_SEPARATOR(),
                        keccak256(
                            abi.encode(
                                keccak256(
                                    "Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"
                                ),
                                owner,
                                spender,
                                value,
                                nonces[owner]++,
                                deadline
                            )
                        )
                    )
                ),
                v,
                r,
                s
            );

            require(recoveredAddress != address(0) && recoveredAddress == owner, "INVALID_SIGNER");

            allowance[recoveredAddress][spender] = value;
        }

        emit Approval(owner, spender, value);
    }

    function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {
        return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator();
    }

    function computeDomainSeparator() internal view virtual returns (bytes32) {
        return
            keccak256(
                abi.encode(
                    keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"),
                    keccak256(bytes(name)),
                    keccak256("1"),
                    block.chainid,
                    address(this)
                )
            );
    }

    /*//////////////////////////////////////////////////////////////
                        INTERNAL MINT/BURN LOGIC
    //////////////////////////////////////////////////////////////*/

    function _mint(address to, uint256 amount) internal virtual {
        totalSupply += amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(address(0), to, amount);
    }

    function _burn(address from, uint256 amount) internal virtual {
        balanceOf[from] -= amount;

        // Cannot underflow because a user's balance
        // will never be larger than the total supply.
        unchecked {
            totalSupply -= amount;
        }

        emit Transfer(from, address(0), amount);
    }
}

File 9 of 10 : IUniswapV2Router02.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.25;

interface IUniswapV2Router02 {
    function WETH() external view returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint256 amountADesired,
        uint256 amountBDesired,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountA, uint256 amountB, uint256 liquidity);

    function addLiquidityETH(
        address token,
        uint256 amountTokenDesired,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    ) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);

    function factory() external view returns (address);

    function getAmountIn(uint256 amountOut, uint256 reserveIn, uint256 reserveOut)
        external
        pure
        returns (uint256 amountIn);

    function getAmountOut(uint256 amountIn, uint256 reserveIn, uint256 reserveOut)
        external
        pure
        returns (uint256 amountOut);

    function getAmountsIn(uint256 amountOut, address[] memory path) external view returns (uint256[] memory amounts);

    function getAmountsOut(uint256 amountIn, address[] memory path) external view returns (uint256[] memory amounts);

    function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pure returns (uint256 amountB);

    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint256 liquidity,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountA, uint256 amountB);

    function removeLiquidityETH(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountToken, uint256 amountETH);

    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountETH);

    function removeLiquidityETHWithPermit(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external returns (uint256 amountToken, uint256 amountETH);

    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external returns (uint256 amountETH);

    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint256 liquidity,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external returns (uint256 amountA, uint256 amountB);

    function swapETHForExactTokens(uint256 amountOut, address[] memory path, address to, uint256 deadline)
        external
        payable
        returns (uint256[] memory amounts);

    function swapExactETHForTokens(uint256 amountOutMin, address[] memory path, address to, uint256 deadline)
        external
        payable
        returns (uint256[] memory amounts);

    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint256 amountOutMin,
        address[] memory path,
        address to,
        uint256 deadline
    ) external payable;

    function swapExactTokensForETH(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] memory path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] memory path,
        address to,
        uint256 deadline
    ) external;

    function swapExactTokensForTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] memory path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] memory path,
        address to,
        uint256 deadline
    ) external;

    function swapTokensForExactETH(
        uint256 amountOut,
        uint256 amountInMax,
        address[] memory path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapTokensForExactTokens(
        uint256 amountOut,
        uint256 amountInMax,
        address[] memory path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    receive() external payable;
}

File 10 of 10 : IUniswapV2Factory.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.25;

interface IUniswapV2Factory {
    event PairCreated(address indexed token0, address indexed token1, address pair, uint256);

    function allPairs(uint256) external view returns (address);
    function allPairsLength() external view returns (uint256);
    function createPair(address tokenA, address tokenB) external returns (address pair);
    function feeTo() external view returns (address);
    function feeToSetter() external view returns (address);
    function getPair(address, address) external view returns (address);
    function setFeeTo(address _feeTo) external;
    function setFeeToSetter(address _feeToSetter) external;
}

Settings
{
  "remappings": [
    "ds-test/=lib/solmate/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/",
    "solmate/=lib/solmate/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 1000000
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "viaIR": true,
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint8","name":"_decimals","type":"uint8"},{"internalType":"uint256","name":"_supply","type":"uint256"},{"internalType":"string","name":"_description","type":"string"},{"internalType":"string","name":"_extended","type":"string"},{"internalType":"address","name":"_wenFoundry","type":"address"},{"internalType":"address","name":"_creator","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"NotApprovable","type":"error"},{"inputs":[],"name":"NotWenFoundry","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"creator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"description","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"extended","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getHolders","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getHoldersLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getHoldersWithBalance","outputs":[{"internalType":"address[]","name":"","type":"address[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMetadata","outputs":[{"components":[{"internalType":"contract WenToken","name":"token","type":"address"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"string","name":"description","type":"string"},{"internalType":"string","name":"extended","type":"string"},{"internalType":"address","name":"creator","type":"address"},{"internalType":"bool","name":"isGraduated","type":"bool"},{"internalType":"uint256","name":"mcap","type":"uint256"}],"internalType":"struct WenToken.Metadata","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"holders","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isApprovable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isGraduated","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isHolder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isApprovable","type":"bool"}],"name":"setIsApprovable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wenFoundry","outputs":[{"internalType":"contract WenFoundry","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

6101206040818152346107b957612673803803809161001e82866107be565b843982016101009283818303126107b95780516001600160401b0391908281116107b9578361004e9183016107e1565b91602090818301518181116107b957856100699185016107e1565b93868401519360ff851685036107b95760608101519260808201518181116107b957886100979184016107e1565b9760a0830151908282116107b9576100b09184016107e1565b926100c960e06100c260c08601610850565b9401610850565b938151978389116107a357600098806100e28b54610864565b94601f95868111610757575b508a908683116001146106f4578c926106e9575b50508160011b916000199060031b1c19161789555b89518481116105aa578060019b61012e8d54610864565b86811161069b575b508a90868311600114610632578c92610627575b5050600019600383901b1c1916908b1b178a555b6080524660a052888b5189818b549161017683610864565b928383528c808401968216918260001461060c5750506001146105d2575b6101a0925003826107be565b5190208b51888101917f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f83528d8201527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260a0815260c08101818110868211176105be578d5251902060c05260ff19998a600a5416600a558051908482116105aa578190610240600654610864565b85811161055b575b5089908583116001146104f1578b926104e6575b5050600019600383901b1c1916908a1b176006555b80519283116104d257908291610288600754610864565b828111610481575b5087918311600114610420578892610415575b5050600019600383901b1c191690871b176007555b6001600160a01b031660e052875260025481810190811061040157600255338352600382528583208181540190558551908152827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef833393a33382526009815260ff858320541615610382575b858551611dd4918261089f833960805182610f53015260a051826117e6015260c0518261180d015260e0518281816107fb01528181610b0401528181610fc3015281816110e60152611c09015251818181610bff01526113f80152f35b600854680100000000000000008110156103ed57838101806008558110156103d957600883528183200180546001600160a01b03191633908117909155825260099052839020805490921617905538808080610325565b634e487b7160e01b83526032600452602483fd5b634e487b7160e01b83526041600452602483fd5b634e487b7160e01b84526011600452602484fd5b0151905038806102a3565b600789528789208a94509190601f1984168a5b8a82821061046b5750508411610452575b505050811b016007556102b8565b015160001960f88460031b161c19169055388080610444565b8385015186558d97909501949384019301610433565b90919250600789528789208380860160051c8201928a87106104c9575b9186958d929594930160051c01915b8281106104bb575050610290565b8b81558695508c91016104ad565b9250819261049e565b634e487b7160e01b88526041600452602488fd5b01519050388061025c565b60068c528a8c208d94509190601f1984168d5b8d82821061053c5750508411610523575b505050811b01600655610271565b015160001960f88460031b161c19169055388080610515565b91929395968291958786015181550195019301908e9594939291610504565b90915060068b52898b208580850160051c8201928c86106105a1575b918e91869594930160051c01915b828110610593575050610248565b8d81558594508e9101610585565b92508192610577565b634e487b7160e01b8a52604160045260248afd5b634e487b7160e01b8b52604160045260248bfd5b508a8c8e8180528282205b8583106105f35750506101a09350820101610194565b8091929450548385880101520191018b908e85936105dd565b60ff191687526101a094151560051b84010191506101949050565b01519050388061014a565b8d8d528b8d208e94509190601f1984168e8e5b82821061067b5750508411610662575b505050811b018a5561015e565b015160001960f88460031b161c19169055388080610655565b91929395968291958786015181550195019301908f95949392918e610645565b9091508c8c528a8c208680850160051c8201928d86106106e0575b918f91869594930160051c01915b8281106106d2575050610136565b8e81558594508f91016106c4565b925081926106b6565b015190503880610102565b8c80528b8d209250601f1984168d5b8d828210610741575050908460019594939210610728575b505050811b018955610117565b015160001960f88460031b161c1916905538808061071b565b6001859682939686015181550195019301610703565b9091508b80528a8c208680850160051c8201928d861061079a575b9085949392910160051c01905b81811061078c57506100ee565b8d815584935060010161077f565b92508192610772565b634e487b7160e01b600052604160045260246000fd5b600080fd5b601f909101601f19168101906001600160401b038211908210176107a357604052565b919080601f840112156107b95782516001600160401b0381116107a3576020906040519261081883601f19601f85011601856107be565b8184528282870101116107b95760005b81811061083d57508260009394955001015290565b8581018301518482018401528201610828565b51906001600160a01b03821682036107b957565b90600182811c92168015610894575b602083101461087e57565b634e487b7160e01b600052602260045260246000fd5b91607f169161087356fe6080604081815260048036101561001557600080fd5b60009260e08435811c91826302d05d3f146113ae5750816306fdde03146112df578163095ea7b31461120f57816318160ddd146111d157816323b872dd146110545781632a11ced014610fe75781633051453014610f77578163313ce56714610f1a57816331a18ea114610ed75781633644e51514610e945781635fe8e7cc14610e445781636f3921ee14610e0757816370a0823114610da45781637284e41614610d545781637a5b4f5914610a505781637ecebe00146109ed57816395d89b41146108c25781639e5f26021461087d578163a71406b6146107a6578163a9059cbb146106ef578163ce2fde3314610584578163d4d7b19a1461051c578163d505accf146101ef57508063db04aef4146101ae5763dd62ed3e1461013857600080fd5b346101aa57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa5760209282916101736116e6565b61017b61170e565b9173ffffffffffffffffffffffffffffffffffffffff8092168452865283832091168252845220549051908152f35b8280fd5b5050346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb576020906008549051908152f35b5080fd5b84915083346101aa57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa576102296116e6565b61023161170e565b9160443590606435926084359460ff86168096036105185760ff600a5416156104f057428510610493576102636117e1565b9473ffffffffffffffffffffffffffffffffffffffff80931696878a5260209660058852858b20998a549a60018c019055865193868a8601967f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c988528c8a880152169b8c606087015289608087015260a086015260c085015260c08452830167ffffffffffffffff948482108683111761046657818852845190206101008501927f19010000000000000000000000000000000000000000000000000000000000008452610102860152610122850152604281526101608401948186109086111761043a57848752519020835261018082015260a4356101a082015260c4356101c0909101528780528490889060809060015afa15610430578651169687151580610427575b156103cc5786977f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259596975283528087208688528352818188205551908152a380f35b8360649251917f08c379a0000000000000000000000000000000000000000000000000000000008352820152600e60248201527f494e56414c49445f5349474e45520000000000000000000000000000000000006044820152fd5b50848814610389565b81513d88823e3d90fd5b60248c60418f7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b5060248c60418f7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b60648960208551917f08c379a0000000000000000000000000000000000000000000000000000000008352820152601760248201527f5045524d49545f444541444c494e455f455850495245440000000000000000006044820152fd5b8883517fad8c648b000000000000000000000000000000000000000000000000000000008152fd5b8780fd5b505050346101eb5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb5760ff8160209373ffffffffffffffffffffffffffffffffffffffff6105716116e6565b1681526009855220541690519015158152f35b505082346106ec57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126106ec579190600854926105c484611c71565b6105d0845191826114bb565b8481526105dc85611c71565b926020957fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08784019501368637835b8181106106695750505061061d6119bf565b94806106328651978789988952880190611797565b928684038288015251928381520193925b82811061065257505050500390f35b835185528695509381019392810192600101610643565b73ffffffffffffffffffffffffffffffffffffffff61068d82999695979899611731565b919054600392831b1c16855285528784205486518210156106c057600582901b870186015293969594929360010161060b565b6024856032867f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b80fd5b505050346101eb57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb5760209161072b6116e6565b8273ffffffffffffffffffffffffffffffffffffffff6024359261074e81611c89565b33855260038752828520610763858254611d62565b90551692838152600386522081815401905582519081527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef843392a35160018152f35b5050346101aa5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa578035918215158093036108795773ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016330361085357505060ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00600a5416911617600a5580f35b517f4cf23ebf000000000000000000000000000000000000000000000000000000008152fd5b8380fd5b505050346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb576020906108b9611bbc565b90519015158152f35b8385346106ec57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126106ec578151918282600193600154946109078661141c565b91828552602096876001821691826000146109a857505060011461094c575b50505061094892916109399103856114bb565b519282849384528301906116a3565b0390f35b9190869350600183527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b8284106109905750505082010181610939610948610926565b8054848a018601528895508794909301928101610977565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168782015293151560051b8601909301935084925061093991506109489050610926565b505050346101eb5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb578060209273ffffffffffffffffffffffffffffffffffffffff610a406116e6565b1681526005845220549051908152f35b848385346101aa57827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa578051610a8c8161146f565b8381528385606092836020820152838582015283808201528360808201528260a08201528260c0820152015273ffffffffffffffffffffffffffffffffffffffff9482517fbbe4f6db00000000000000000000000000000000000000000000000000000000815230858201526101809081816024818b7f0000000000000000000000000000000000000000000000000000000000000000165afa918215610d1d578792610d27575b50508351947f06fdde0300000000000000000000000000000000000000000000000000000000865286868281305afa958615610d1d578796610d01575b5086855180927f95d89b4100000000000000000000000000000000000000000000000000000000825281305afa968715610cf6578097610cd1575b505086610bb7611bbc565b9160c0015193855197610bc98961146f565b30895260208901978852868901908152610be16115e1565b828a01908152610bef6114fc565b9160808b0192835260a08b0199857f0000000000000000000000000000000000000000000000000000000000000000168b5260c08c019615158752878c0198895289519c8d9c60208e52511660208d015251610100809a8d01526101208c01610c57916116a3565b9051907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe094858d830301908d0152610c8e916116a3565b905190838b82030160808c0152610ca4916116a3565b9051918982030160a08a0152610cb9916116a3565b95511660c08701525115159085015251908301520390f35b610cee9297503d8091833e610ce681836114bb565b810190611b32565b948780610bac565b8551903d90823e3d90fd5b610d169196503d8089833e610ce681836114bb565b9488610b71565b85513d89823e3d90fd5b610d469250803d10610d4d575b610d3e81836114bb565b810190611a64565b8780610b34565b503d610d34565b505050346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb5761094890610d916115e1565b90519182916020835260208301906116a3565b505050346101eb5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb578060209273ffffffffffffffffffffffffffffffffffffffff610df76116e6565b1681526003845220549051908152f35b505050346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb5761094890610d916114fc565b505050346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb5761094890610e816119bf565b9051918291602083526020830190611797565b505050346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb57602090610ed06117e1565b9051908152f35b505050346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb5760209060ff600a541690519015158152f35b505050346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb576020905160ff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b505050346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb576020905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b5050346101aa5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa5735916008548310156106ec575073ffffffffffffffffffffffffffffffffffffffff611045602093611731565b92905490519260031b1c168152f35b505091346106ec5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126106ec5761108e6116e6565b7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6110b761170e565b946044358573ffffffffffffffffffffffffffffffffffffffff80951694858752602098848a958652838920837f00000000000000000000000000000000000000000000000000000000000000001690818b5287527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9081868c2054036111b8575b5061114383611c89565b888a52818752848a20338b52875285858b2054918203611195575b50505086885260038552828820611176858254611d62565b9055169586815260038452208181540190558551908152a35160018152f35b61119e91611d62565b90888a528652838920338a5286528389205538808561115e565b898b52828852858b20908b52875280858b205538611139565b505050346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb576020906002549051908152f35b505091346106ec57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126106ec576112486116e6565b906024359060ff600a5416156112b657838291602096338252875273ffffffffffffffffffffffffffffffffffffffff8282209516948582528752205582519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925843392a35160018152f35b505050517fad8c648b000000000000000000000000000000000000000000000000000000008152fd5b8385346106ec57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126106ec578151918282835461131f8161141c565b90818452602095600191876001821691826000146109a85750506001146113535750505061094892916109399103856114bb565b91908693508280527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b8284106113965750505082010181610939610948610926565b8054848a01860152889550879490930192810161137d565b8590346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb5760209073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b90600182811c92168015611465575b602083101461143657565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f169161142b565b610100810190811067ffffffffffffffff82111761148c57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761148c57604052565b60405190600082600754916115108361141c565b8083529260209060019081811690811561159e575060011461153d575b505061153b925003836114bb565b565b91509260076000527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688936000925b828410611586575061153b945050508101602001388061152d565b8554888501830152948501948794509281019261156b565b90506020935061153b9592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b820101388061152d565b60405190600082600654916115f58361141c565b8083529260209060019081811690811561159e575060011461161f57505061153b925003836114bb565b91509260066000527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f936000925b828410611668575061153b945050508101602001388061152d565b8554888501830152948501948794509281019261164d565b60005b8381106116935750506000910152565b8181015183820152602001611683565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f6020936116df81518092818752878088019101611680565b0116010190565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361170957565b600080fd5b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361170957565b6008548110156117685760086000527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30190600090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90815180825260208080930193019160005b8281106117b7575050505090565b835173ffffffffffffffffffffffffffffffffffffffff16855293810193928101926001016117a9565b6000467f00000000000000000000000000000000000000000000000000000000000000000361182f57507f000000000000000000000000000000000000000000000000000000000000000090565b6040518154829161183f8261141c565b80825281602094858201946001908760018216918260001461198357505060011461192a575b50611872925003826114bb565b51902091604051918201927f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f845260408301527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608301524660808301523060a083015260a0825260c082019082821067ffffffffffffffff8311176118fd575060405251902090565b807f4e487b7100000000000000000000000000000000000000000000000000000000602492526041600452fd5b87805286915087907f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b85831061196b575050611872935082010138611865565b80548388018501528694508893909201918101611954565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016885261187295151560051b85010192503891506118659050565b6040519060085480835282602091602082019060086000527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee3936000905b828210611a135750505061153b925003836114bb565b855473ffffffffffffffffffffffffffffffffffffffff16845260019586019588955093810193909101906119fd565b519073ffffffffffffffffffffffffffffffffffffffff8216820361170957565b809161018092839103126117095760405191820182811067ffffffffffffffff82111761148c57604052805173ffffffffffffffffffffffffffffffffffffffff811681036117095782526020810151602083015260408101516040830152606081015160608301526080810151608083015260a081015160a083015260c081015160c083015260e081015160e08301526101008082015190830152610120611b0e818301611a43565b90830152610140611b20818301611a43565b90830152610160809101519082015290565b60208183031261170957805167ffffffffffffffff9182821161170957019082601f8301121561170957815190811161148c5760405192611b9b60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011601856114bb565b8184526020828401011161170957611bb99160208085019101611680565b90565b73ffffffffffffffffffffffffffffffffffffffff6040517fbbe4f6db000000000000000000000000000000000000000000000000000000008152306004820152610180908181602481867f0000000000000000000000000000000000000000000000000000000000000000165afa908115611c655761014092600092611c48575b5050015116151590565b611c5e9250803d10610d4d57610d3e81836114bb565b3880611c3e565b6040513d6000823e3d90fd5b67ffffffffffffffff811161148c5760051b60200190565b9073ffffffffffffffffffffffffffffffffffffffff809216600090808252600960205260ff60408320541615611cc1575b50509050565b6008549368010000000000000000851015611d3557611ce98560016040969701600855611731565b819291549060031b9184831b921b1916179055815260096020522060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00825416179055803880611cbb565b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b91908203918211611d6f57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea26469706673582212201d0c5b6f407118f618db7da897910caf165d2d14f5243c63c966354ecbd57eaf64736f6c634300081900330000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000033b2e3c9fd0803ce8000000000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000002000000000000000000000000003bb94837a91e22a134053b9f38728e27055ec3d1000000000000000000000000c392805d8b78ad32746ca11c239f4d1188cdafb9000000000000000000000000000000000000000000000000000000000000000942756e6e7920436174000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000054c4d454f57000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004962756e6e79206361742077696620636172726f742e20666972737420746f6b656e206f6e2077656e2e6d61726b6574732e2068616c6620746573742c2068616c6620736572696f757300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x6080604081815260048036101561001557600080fd5b60009260e08435811c91826302d05d3f146113ae5750816306fdde03146112df578163095ea7b31461120f57816318160ddd146111d157816323b872dd146110545781632a11ced014610fe75781633051453014610f77578163313ce56714610f1a57816331a18ea114610ed75781633644e51514610e945781635fe8e7cc14610e445781636f3921ee14610e0757816370a0823114610da45781637284e41614610d545781637a5b4f5914610a505781637ecebe00146109ed57816395d89b41146108c25781639e5f26021461087d578163a71406b6146107a6578163a9059cbb146106ef578163ce2fde3314610584578163d4d7b19a1461051c578163d505accf146101ef57508063db04aef4146101ae5763dd62ed3e1461013857600080fd5b346101aa57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa5760209282916101736116e6565b61017b61170e565b9173ffffffffffffffffffffffffffffffffffffffff8092168452865283832091168252845220549051908152f35b8280fd5b5050346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb576020906008549051908152f35b5080fd5b84915083346101aa57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa576102296116e6565b61023161170e565b9160443590606435926084359460ff86168096036105185760ff600a5416156104f057428510610493576102636117e1565b9473ffffffffffffffffffffffffffffffffffffffff80931696878a5260209660058852858b20998a549a60018c019055865193868a8601967f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c988528c8a880152169b8c606087015289608087015260a086015260c085015260c08452830167ffffffffffffffff948482108683111761046657818852845190206101008501927f19010000000000000000000000000000000000000000000000000000000000008452610102860152610122850152604281526101608401948186109086111761043a57848752519020835261018082015260a4356101a082015260c4356101c0909101528780528490889060809060015afa15610430578651169687151580610427575b156103cc5786977f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259596975283528087208688528352818188205551908152a380f35b8360649251917f08c379a0000000000000000000000000000000000000000000000000000000008352820152600e60248201527f494e56414c49445f5349474e45520000000000000000000000000000000000006044820152fd5b50848814610389565b81513d88823e3d90fd5b60248c60418f7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b5060248c60418f7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b60648960208551917f08c379a0000000000000000000000000000000000000000000000000000000008352820152601760248201527f5045524d49545f444541444c494e455f455850495245440000000000000000006044820152fd5b8883517fad8c648b000000000000000000000000000000000000000000000000000000008152fd5b8780fd5b505050346101eb5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb5760ff8160209373ffffffffffffffffffffffffffffffffffffffff6105716116e6565b1681526009855220541690519015158152f35b505082346106ec57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126106ec579190600854926105c484611c71565b6105d0845191826114bb565b8481526105dc85611c71565b926020957fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08784019501368637835b8181106106695750505061061d6119bf565b94806106328651978789988952880190611797565b928684038288015251928381520193925b82811061065257505050500390f35b835185528695509381019392810192600101610643565b73ffffffffffffffffffffffffffffffffffffffff61068d82999695979899611731565b919054600392831b1c16855285528784205486518210156106c057600582901b870186015293969594929360010161060b565b6024856032867f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b80fd5b505050346101eb57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb5760209161072b6116e6565b8273ffffffffffffffffffffffffffffffffffffffff6024359261074e81611c89565b33855260038752828520610763858254611d62565b90551692838152600386522081815401905582519081527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef843392a35160018152f35b5050346101aa5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa578035918215158093036108795773ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000003bb94837a91e22a134053b9f38728e27055ec3d116330361085357505060ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00600a5416911617600a5580f35b517f4cf23ebf000000000000000000000000000000000000000000000000000000008152fd5b8380fd5b505050346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb576020906108b9611bbc565b90519015158152f35b8385346106ec57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126106ec578151918282600193600154946109078661141c565b91828552602096876001821691826000146109a857505060011461094c575b50505061094892916109399103856114bb565b519282849384528301906116a3565b0390f35b9190869350600183527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b8284106109905750505082010181610939610948610926565b8054848a018601528895508794909301928101610977565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168782015293151560051b8601909301935084925061093991506109489050610926565b505050346101eb5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb578060209273ffffffffffffffffffffffffffffffffffffffff610a406116e6565b1681526005845220549051908152f35b848385346101aa57827ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa578051610a8c8161146f565b8381528385606092836020820152838582015283808201528360808201528260a08201528260c0820152015273ffffffffffffffffffffffffffffffffffffffff9482517fbbe4f6db00000000000000000000000000000000000000000000000000000000815230858201526101809081816024818b7f0000000000000000000000003bb94837a91e22a134053b9f38728e27055ec3d1165afa918215610d1d578792610d27575b50508351947f06fdde0300000000000000000000000000000000000000000000000000000000865286868281305afa958615610d1d578796610d01575b5086855180927f95d89b4100000000000000000000000000000000000000000000000000000000825281305afa968715610cf6578097610cd1575b505086610bb7611bbc565b9160c0015193855197610bc98961146f565b30895260208901978852868901908152610be16115e1565b828a01908152610bef6114fc565b9160808b0192835260a08b0199857f000000000000000000000000c392805d8b78ad32746ca11c239f4d1188cdafb9168b5260c08c019615158752878c0198895289519c8d9c60208e52511660208d015251610100809a8d01526101208c01610c57916116a3565b9051907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe094858d830301908d0152610c8e916116a3565b905190838b82030160808c0152610ca4916116a3565b9051918982030160a08a0152610cb9916116a3565b95511660c08701525115159085015251908301520390f35b610cee9297503d8091833e610ce681836114bb565b810190611b32565b948780610bac565b8551903d90823e3d90fd5b610d169196503d8089833e610ce681836114bb565b9488610b71565b85513d89823e3d90fd5b610d469250803d10610d4d575b610d3e81836114bb565b810190611a64565b8780610b34565b503d610d34565b505050346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb5761094890610d916115e1565b90519182916020835260208301906116a3565b505050346101eb5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb578060209273ffffffffffffffffffffffffffffffffffffffff610df76116e6565b1681526003845220549051908152f35b505050346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb5761094890610d916114fc565b505050346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb5761094890610e816119bf565b9051918291602083526020830190611797565b505050346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb57602090610ed06117e1565b9051908152f35b505050346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb5760209060ff600a541690519015158152f35b505050346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb576020905160ff7f0000000000000000000000000000000000000000000000000000000000000012168152f35b505050346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb576020905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000003bb94837a91e22a134053b9f38728e27055ec3d1168152f35b5050346101aa5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101aa5735916008548310156106ec575073ffffffffffffffffffffffffffffffffffffffff611045602093611731565b92905490519260031b1c168152f35b505091346106ec5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126106ec5761108e6116e6565b7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6110b761170e565b946044358573ffffffffffffffffffffffffffffffffffffffff80951694858752602098848a958652838920837f0000000000000000000000003bb94837a91e22a134053b9f38728e27055ec3d11690818b5287527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9081868c2054036111b8575b5061114383611c89565b888a52818752848a20338b52875285858b2054918203611195575b50505086885260038552828820611176858254611d62565b9055169586815260038452208181540190558551908152a35160018152f35b61119e91611d62565b90888a528652838920338a5286528389205538808561115e565b898b52828852858b20908b52875280858b205538611139565b505050346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb576020906002549051908152f35b505091346106ec57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126106ec576112486116e6565b906024359060ff600a5416156112b657838291602096338252875273ffffffffffffffffffffffffffffffffffffffff8282209516948582528752205582519081527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925843392a35160018152f35b505050517fad8c648b000000000000000000000000000000000000000000000000000000008152fd5b8385346106ec57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126106ec578151918282835461131f8161141c565b90818452602095600191876001821691826000146109a85750506001146113535750505061094892916109399103856114bb565b91908693508280527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b8284106113965750505082010181610939610948610926565b8054848a01860152889550879490930192810161137d565b8590346101eb57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101eb5760209073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000c392805d8b78ad32746ca11c239f4d1188cdafb9168152f35b90600182811c92168015611465575b602083101461143657565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f169161142b565b610100810190811067ffffffffffffffff82111761148c57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761148c57604052565b60405190600082600754916115108361141c565b8083529260209060019081811690811561159e575060011461153d575b505061153b925003836114bb565b565b91509260076000527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688936000925b828410611586575061153b945050508101602001388061152d565b8554888501830152948501948794509281019261156b565b90506020935061153b9592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b820101388061152d565b60405190600082600654916115f58361141c565b8083529260209060019081811690811561159e575060011461161f57505061153b925003836114bb565b91509260066000527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f936000925b828410611668575061153b945050508101602001388061152d565b8554888501830152948501948794509281019261164d565b60005b8381106116935750506000910152565b8181015183820152602001611683565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f6020936116df81518092818752878088019101611680565b0116010190565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361170957565b600080fd5b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361170957565b6008548110156117685760086000527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30190600090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90815180825260208080930193019160005b8281106117b7575050505090565b835173ffffffffffffffffffffffffffffffffffffffff16855293810193928101926001016117a9565b6000467f00000000000000000000000000000000000000000000000000000000000000890361182f57507fb88220629b872b7daf6e6038072b06827c4cec1a4d9137874fcd80c965f12e9c90565b6040518154829161183f8261141c565b80825281602094858201946001908760018216918260001461198357505060011461192a575b50611872925003826114bb565b51902091604051918201927f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f845260408301527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608301524660808301523060a083015260a0825260c082019082821067ffffffffffffffff8311176118fd575060405251902090565b807f4e487b7100000000000000000000000000000000000000000000000000000000602492526041600452fd5b87805286915087907f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b85831061196b575050611872935082010138611865565b80548388018501528694508893909201918101611954565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016885261187295151560051b85010192503891506118659050565b6040519060085480835282602091602082019060086000527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee3936000905b828210611a135750505061153b925003836114bb565b855473ffffffffffffffffffffffffffffffffffffffff16845260019586019588955093810193909101906119fd565b519073ffffffffffffffffffffffffffffffffffffffff8216820361170957565b809161018092839103126117095760405191820182811067ffffffffffffffff82111761148c57604052805173ffffffffffffffffffffffffffffffffffffffff811681036117095782526020810151602083015260408101516040830152606081015160608301526080810151608083015260a081015160a083015260c081015160c083015260e081015160e08301526101008082015190830152610120611b0e818301611a43565b90830152610140611b20818301611a43565b90830152610160809101519082015290565b60208183031261170957805167ffffffffffffffff9182821161170957019082601f8301121561170957815190811161148c5760405192611b9b60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011601856114bb565b8184526020828401011161170957611bb99160208085019101611680565b90565b73ffffffffffffffffffffffffffffffffffffffff6040517fbbe4f6db000000000000000000000000000000000000000000000000000000008152306004820152610180908181602481867f0000000000000000000000003bb94837a91e22a134053b9f38728e27055ec3d1165afa908115611c655761014092600092611c48575b5050015116151590565b611c5e9250803d10610d4d57610d3e81836114bb565b3880611c3e565b6040513d6000823e3d90fd5b67ffffffffffffffff811161148c5760051b60200190565b9073ffffffffffffffffffffffffffffffffffffffff809216600090808252600960205260ff60408320541615611cc1575b50509050565b6008549368010000000000000000851015611d3557611ce98560016040969701600855611731565b819291549060031b9184831b921b1916179055815260096020522060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00825416179055803880611cbb565b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b91908203918211611d6f57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea26469706673582212201d0c5b6f407118f618db7da897910caf165d2d14f5243c63c966354ecbd57eaf64736f6c63430008190033

Deployed Bytecode Sourcemap

631:3982:7:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4590:7;631:3982;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;3409:12;631:3982;;3408:13;3404:41;;4057:15:0;4045:27;;631:3982:7;;4428:18:0;;:::i;:::-;631:3982:7;;;;;;;;;;;4873:6:0;631:3982:7;;;;;;;;;;;;;;;;4511:449:0;;;;;631:3982:7;4555:165:0;631:3982:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;4511:449:0;;631:3982:7;;;;;;;;;;;;;;;;;;4472:514:0;;4350:658;;;631:3982:7;;;;;;;;;;;;;4350:658:0;;631:3982:7;;;;;;;;;;;;;;;;;4319:707:0;;631:3982:7;;;;;;;;;;;;;;;;;;;4292:805:0;;;631:3982:7;;;;;;;4292:805:0;;;;;;;631:3982:7;5120:30:0;;;;:59;;;631:3982:7;;;;;;5283:31:0;631:3982:7;;;;;;;;;;;;;;;;;;;;;;;5283:31:0;631:3982:7;;;;;;;;;;;;;;;;;;;;;;;;;5120:59:0;5154:25;;;;5120:59;;4292:805;631:3982:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3404:41;631:3982;;;3430:15;;;;631:3982;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;1059:40;631:3982;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3815:7;631:3982;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;;;3904:13;3919:10;;;;;;631:3982;;;;;:::i;:::-;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;631:3982:7;;;;;;;;;;;;3931:3;631:3982;3967:10;;;;;;;;;:::i;:::-;631:3982;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3904:13;;;;631:3982;;3904:13;;631:3982;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;2626:2;;;;:::i;:::-;2774:10:0;631:3982:7;;2764:9:0;631:3982:7;;;;;2764:31:0;631:3982:7;;;2764:31:0;:::i;:::-;631:3982:7;;;;;;;2764:9:0;631:3982:7;;;;;;;;;;;;;;2990:32:0;2774:10;;2990:32;;631:3982:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2442:10;631:3982;2420:10;:33;2416:61;;631:3982;;;;2487:28;631:3982;;;;;2487:28;631:3982;;;2416:61;631:3982;2462:15;;;;631:3982;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;1056:20:0;631:3982:7;1056:20:0;631:3982:7;;;;;:::i;:::-;;;;;;;;1056:20:0;631:3982:7;;1056:20:0;;631:3982:7;1056:20:0;;;631:3982:7;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;;;;;;;;;;1056:20:0;631:3982:7;;;;;;;;;-1:-1:-1;;;631:3982:7;;;;;;;;;;;;;;;;;;;-1:-1:-1;631:3982:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;631:3982:7;;-1:-1:-1;631:3982:7;;-1:-1:-1;631:3982:7;;-1:-1:-1;631:3982:7;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;1751:41:0;631:3982:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1999:24;;2018:4;1999:24;;;631:3982;1999:24;:10;;;631:3982;1999:10;;;631:3982;1999:24;;;;;;;;;;;631:3982;;;;;2074:11;631:3982;2074:11;;2018:4;;;;;2074:11;;;;;;;;;;;631:3982;;;;;2087:13;;631:3982;2087:13;;2018:4;;2087:13;;;;;;;;;;;631:3982;2134:13;;;;;:::i;:::-;2149:18;631:3982;2149:18;631:3982;;;;;;;;:::i;:::-;2018:4;631:3982;;;2040:128;;631:3982;;;2040:128;;;631:3982;;;;;:::i;:::-;2040:128;;;631:3982;;;;;:::i;:::-;2040:128;631:3982;2040:128;;631:3982;;;;2040:128;;2125:7;;;631:3982;;;;2040:128;;631:3982;;;;;2040:128;;;631:3982;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;2087:13;;;;;;;;;;;;;;:::i;:::-;;;;;:::i;:::-;;;;;;;631:3982;;;;;;;;;;2074:11;;;;;;;;;;;;;;:::i;:::-;;;;;;631:3982;;;;;;;;;1999:24;;;;;;-1:-1:-1;1999:24:7;;;;;;;:::i;:::-;;;;;:::i;:::-;;;;;;;;;;631:3982;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;1337:44:0;631:3982:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;1181:32;631:3982;;;;;;;;;;;;;;;;;;;;;;;;;;;;1083:31:0;631:3982:7;;;;;;;;;;;;;;;;;;;;;;946:38;631:3982;;;;;;;;;;;;;;;;;;;1029:24;631:3982;1029:24;;;;;;631:3982;1029:24;631:3982;1029:24;;:::i;:::-;631:3982;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3594:26:0;631:3982:7;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;2868:10;;631:3982;;;;;;;2884:17;631:3982;;;;;;2844:57;2840:144;;631:3982;3004:2;;;;:::i;:::-;631:3982;;;;;;;;;3225:10:0;631:3982:7;;;;;;;;;3287:28:0;;;3283:80;;631:3982:7;;;;;;;3374:9:0;631:3982:7;;;;;3374:25:0;631:3982:7;;;3374:25:0;:::i;:::-;631:3982:7;;;;;;;3374:9:0;631:3982:7;;;;;;;;;;;;;;3594:26:0;631:3982:7;;;;;3283:80:0;3347:16;;;:::i;:::-;631:3982:7;;;;;;;;;3225:10:0;631:3982:7;;;;;;;;3283:80:0;;;;;2840:144:7;631:3982;;;;;;;;;;;;;;;;;;;2840:144;;;631:3982;;;;;;;;;;;;;;;;1304:26:0;631:3982:7;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;3169:12;631:3982;;3168:13;3164:41;;2561:10:0;;;631:3982:7;2561:10:0;;631:3982:7;;;;;;;;;;;;;;;;;;;;;;;2606:37:0;2561:10;;2606:37;;631:3982:7;;;;;3164:41;631:3982;;;;3190:15;;;;631:3982;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;-1:-1:-1;;;631:3982:7;;;;;;;;;;;;;;;;;;;-1:-1:-1;631:3982:7;;;;;;;;;;;;;;;;;;;;;;;;990:32;631:3982;990:32;631:3982;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;-1:-1:-1;631:3982:7;918:22;631:3982;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:::o;:::-;;;;918:22;-1:-1:-1;631:3982:7;;;-1:-1:-1;631:3982:7;;;;;;;-1:-1:-1;631:3982:7;;-1:-1:-1;;;631:3982:7;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;631:3982:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;631:3982:7;887:25;631:3982;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;887:25;-1:-1:-1;631:3982:7;;;-1:-1:-1;631:3982:7;;;;;;;-1:-1:-1;631:3982:7;;-1:-1:-1;;;631:3982:7;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;631:3982:7;;;;;;;;;;;;;;-1:-1:-1;;631:3982:7;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;:::o;:::-;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;:::o;:::-;1029:24;631:3982;;;;;;1029:24;-1:-1:-1;631:3982:7;;;;-1:-1:-1;631:3982:7;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;631:3982:7;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;5327:177:0;-1:-1:-1;5410:13:0;5427:16;5410:33;5427:16;;5446:24;;5327:177;:::o;5410:87::-;631:3982:7;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;5789:22:0;;631:3982:7;;;5640:295:0;;;631:3982:7;5672:95:0;631:3982:7;;;;;;5833:14:0;631:3982:7;;;;5410:13:0;631:3982:7;;;;5912:4:0;631:3982:7;;;;;5640:295:0;;631:3982:7;;;;;;;;;;;;;;;;;5613:336:0;;5327:177;:::o;631:3982:7:-;;;;;;;;;;;;;;;;-1:-1:-1;631:3982:7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;631:3982:7;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;631:3982:7;;-1:-1:-1;631:3982:7;;-1:-1:-1;631:3982:7;;;;;4335:7;631:3982;;;;;;;;;;;4335:7;-1:-1:-1;631:3982:7;;;-1:-1:-1;631:3982:7;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;-1:-1:-1;631:3982:7;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::o;2181:167::-;631:3982;;;;2271:24;;2290:4;2271:24;;;631:3982;2271:24;:10;;;631:3982;2271:10;;;631:3982;2271:24;;;;;;;2312:15;2271:24;-1:-1:-1;2271:24:7;;;2181:167;2312:15;;;631:3982;;2312:29;;2181:167;:::o;2271:24::-;;;;;;-1:-1:-1;2271:24:7;;;;;;:::i;:::-;;;;;;631:3982;;;-1:-1:-1;631:3982:7;;;;;;;;;;;;;;;;:::o;1727:165::-;;631:3982;;;;-1:-1:-1;631:3982:7;;;;1786:8;631:3982;;;;;;;;1785:17;1781:105;;1727:165;;;;;:::o;1781:105::-;1818:7;631:3982;;;;;;;;;;;;;;;1818:7;631:3982;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;1786:8;631:3982;;;;;;;;;;;1781:105;;;;;631:3982;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;

Swarm Source

ipfs://1d0c5b6f407118f618db7da897910caf165d2d14f5243c63c966354ecbd57eaf
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.