Skip to content
Verified contractPartialAGPL-3.0-only

Voton

Address0x1e24a292c80095e153f3ca60cb24b883fbefa7b3
Balance

0 ETH

 

Transactions

1

 

Compiler

solc 0.8.30

 

Same code

Only this contract

 

Details

Compiler
solc 0.8.30+commit.73712a01
Language
solidity
Optimization
Yes, 200 runs
License
AGPL-3.0-only
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
23,134,991
Creation transaction
0x1ec1d5fa84…be5eafe185

Voton.sol

// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity 0.8.30;
 /*══════════════════════════════════════════════════════════════════════════════════════════════════════════════════*\
 ║   ██╗   ██╗ ██████╗ ████████╗ ██████╗ ███╗   ██╗    ⚡ THE ULTIMATE MEME DEMOCRACY ⚡                                ║
 ║   ██║   ██║██╔═══██╗╚══██╔══╝██╔═══██╗████╗  ██║                                                                   ║
 ║   ██║   ██║██║   ██║   ██║   ██║   ██║██╔██╗ ██║    🗳️ $VOTE - WHERE DREAMS BECOME REALITY 🗳️                      ║
 ║   ╚██╗ ██╔╝██║   ██║   ██║   ██║   ██║██║╚██╗██║                                                                   ║
 ║    ╚████╔╝ ╚██████╔╝   ██║   ╚██████╔╝██║ ╚████║    💎 100 BILLION DREAMS TO FUND 💎                               ║
 ║     ╚═══╝   ╚═════╝    ╚═╝    ╚═════╝ ╚═╝  ╚═══╝                                                                   ║
 ║                ┌─────────────────────────────────────────────────────────────────────────────────┐                 ║
 ║                │  🚀 MISSION: MOON                                                               │                 ║
 ║                │  🎯 TARGET: YOUR WILDEST DREAMS                                                 │                 ║
 ║                │  🛡️ STRATEGY: DIAMOND HANDS ONLY                                                │                 ║
 ║                │  ⚔️ WEAPON: PURE COMMUNITY POWER                                                │                 ║
 ║                └─────────────────────────────────────────────────────────────────────────────────┘                 ║
 ║                             Maybe a platform. Definitely a MEME. Possibly REVOLUTIONARY.                           ║
 ║                              ╔══════════════════════════════════════════════════════╗                              ║
 ║                              ║   THE PEOPLE'S MEME - BUILT BY DEGENS, FOR DEGENS    ║                              ║
 ║                              ╚══════════════════════════════════════════════════════╝                              ║
 ║     ╔═══════════════════════════════════════════════════════════════════════════════════════════════════════╗      ║
 ║     ║                                       🌐 JOIN THE REVOLUTION 🌐                                       ║      ║
 ║     ║                   𝕏: https://x.com/voton_vip       |     Telegram: https://t.me/EnterVoton            ║      ║
 ║     ║             Discord: https://discord.voton.vip     |     Web: https://voton.vip                       ║      ║
 ║     ╚═══════════════════════════════════════════════════════════════════════════════════════════════════════╝      ║
 ╠════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╣
 ║                                     @author Voton                                                                  ║
 ║                                     @author Modified from Solmate                                                  ║
 ║                              🌙 WEN MOON? ALWAYS! 🌙  |  ⚡ WAGMI FOREVER ⚡                                         ║
 \*══════════════════════════════════════════════════════════════════════════════════════════════════════════════════*/

interface IRouter {
    function factory() external pure returns (address);
    function WETH() external pure returns (address);
    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
}

interface IFactory {
    function createPair(address tokenA, address tokenB) external returns (address pair);
    function getPair(address tokenA, address tokenB) external view returns (address pair);
}
/*
                                                                              @@%**#%@@%@@@         
                                           @@@%**++*#%@@@     ..             @#-:::::*::::+@@@      
                                       @@@%*#######****+=#%@:..::. .        @%*-:::::#:::::*--+%@@  
                                      @@%#######*********#++#*-::::...      @*+=:::::#::::-+::::*@@ 
                                    @@%######%#***=:::=**%%%*=%+:-::::.     @*=*+=-==%++=:*-::::*=#@
                                   @@%####%%%%%%#***--**#%%%%%=%*----::     @+=+-::::*:::=#-:::*-:-%
          .....:....              @@%####%%%%%%%%%#****#%%%%%%%+%%%###%%@  @%*****#**=:::+-::=**::+%
          ..::::::::-+%           @%%###%%%%%%%%%%%%%%%%%%#####**%#%####%@@*:==::::::=*+*+-::-*=+=#@
        ....::::-*#%%#%%@@        @%####%%%%%#*+*##%%%%%%#+:::*#*%%%####%@@+:==::::::-*--++**+-::=%@
         .:::::-#%#######%%@      @%#%%#%%%%#=:::-*#%%%%##::::-#+*%%####%%@@#=**==+*#*------=*#%%@@ 
          .:::-=############%@@  @%:-##%%%%%#-::::=##%%%##::::-#***@#####%@ @@+-+%+=--------=#@@    
          ...::-###%%#########%%@%*+=:%#%%%%#=::::-##%%%%#+:::*#*=#@#####%%@@+:-==%@@@%#%%@@#=#@    
           ..::-*%##%%##########%%#=#:=%%%%%%#+::-*##%%%%###*##%#*@%%#####%@=:::-+==++*##*+==-+@    
         :.:::--=#####%%########%@#+*:-%%#%%%%%###########*##%%%#%%%@@@@%#%#:::::::-*#+==*%=::*@    
            ..:::-#%###%%########%%%#=%%%##%%%%%%%##::::::-##%%%%#-=+*+--+%+::::::::::::::::::#@    
            ..::::-*%###%%%########%%%@%####%%%%%%%##=:::=##%%%#*##########+-::::::::::::::::=%@    
               .:::-+%####%%##########%%%%####%%%%%%%%####%%%%########%%=::#=-:::::::::::::::*@     
               ..::::=######%%####%@@@@@@%%%%%###%%%@######%%#######%%=:::-%@+-:::::::::::::+@@     
                 ..:::-#%####%%%@%%##%%###%---=+#%##%%%##%%%#######%#=:::::#@@%+--::::::::-%@@      
                 :..:::-*%###%@%####%%#####*---:::::--+####%######%%*::::::-%@@@@%*++++**%@@        
                  ...:::-+%#%@%#####%%######=-::::::::+%###%######%%=::::::::=#@@@@@@@@**%          
                   .::::::=%@%#####%%####%%%#=:::::::*%####%%#####%%+-::::::::::::--:::*@@          
                  .....::::-%%#####%%%%######%+-::::########%%####%%#=-:::::::::::::::#@            
                    :....::-%%#####%%%##########***##*****###%%###%%@#=--:::::::::::+@@             
                       .::+%*%#####%%####********************##%%%#%@@@#+---------*%@               
                        @%+-**%%###%%##*****+++++++++*********##%%@@@@@@@@@@@%@@@@@                 
                    @@@%+--*=--+#%%%%#*****-++-::-++*=::-****#######%@@@@@@@%%@                     
                @@@%#+=---*=------+#%#****:.-++::+*+:::=****#####+::+%%%%%%#%@@                     
           @@@%#+=--=****+*+=------*%##***+::-+***=:::+****######*::%#######@@                      
       @@@%+--------*+-*#%%@@++----*%###***+:.-++-::-*****#######=:%#######%@                       
    @@%*=----------=***==*-*%@#+=-=*%%##****=:.=*=:+****########*-%#######%@                        
  @@#+------------*#::++#+---*@*+*+=#%%##****=::=*+****########*+########%@@                        
 @%+-------------=#+#*--*-*+-+*==---=%%%##******+*****#######*+#########%@@                         
 %+---------------+##+##=*-+%=-----+%%%#%%##********#######*#%#########@@                           
@#--------------=*=---=*#*%*---=+%@@%##%%+-*############*##%#########%@                             
@+-------------+*=-------==--+#%%######%#%=-----=====------=#%#####%@@                              
@=------------*+--------==-+%%#########*%#%-----------------*%%%%#+@@                               
@+----------=#------------*%###########**%#%=------------*%###%=--#@                                
@*---------=*+#@@@@@@@#+=+##############=*##%+-----=++#**#####*--=@@                                
@%=-------=%@@         @@%%#############=*####*+=+*++#######*=---#@                                 
 @#=-----=%@         @@@@%#############*+##############%%%#=----=%@                                 
  @#----=@@        @%++%%%#############**%#########%@@@%%%------+%@                                 
   @%=-=%@       @@#=*%#%#############+*%%%##%%%%#%#####=-------*@                                  
    @@#%@      @@%+-+%##%%%%#########*%#############%*=--------+@@                                  
      @@       @#=--+%#%*-:::=%####**+%%#########%@%=---------#@@                                   
              @#--==-*%%-::::::*#*++:::+%####%@@@@*--------=#@@                                     
              @*----+#@@=-::::=#%%#-::-%@@@@@@@@#=---==+*%@@@                                       
               @%#%@@@@%+***##%###%%%@@@     @@@%%%@@@@@@                                           
                    @@#=---*%%@@@@@@@                                                               
                    @*--=+%@@                                                                       
                    @%##@@@                                                                         


*/
/// @title VOTON: THE MEME THAT DREAMS BIGGER THAN YOUR PORTFOLIO 🚀
/// @notice LITERALLY JUST VIBES AND A SUPERHERO MASCOT
/// @dev If you're reading this, you're already part of the dream. WAGMI! 🌙
contract Voton {
    // 🎯 EVENTS THAT'LL MAKE YOUR PORTFOLIO DANCE
    event Transfer(address indexed from, address indexed to, uint256 amount);
    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 amount
    );
    event OwnershipTransferred(
        address indexed previousOwner,
        address indexed newOwner
    );
    event MoonMissionInitiated(uint256 amount); // 🚀 WEN MOON? NOW!
    event BotShieldToggled(bool enabled); // 🦸‍♂️ HERO MODE ACTIVATED!
    event BotAlertTriggered(address bot, uint256 amount); // 🤖 BOT DETECTED! VOTON IS ON THE CASE!

    // 🚨 ERRORS MORE DRAMATIC THAN YOUR EX
    error NOT_OWNER(); // "You're not the chosen one, ser"
    error PERMIT_DEADLINE_EXPIRED(); // "Too slow, anon! Time waits for no degen"
    error INVALID_SIGNER(); // "Nice try, but you're not who you say you are"
    error BOT_DETECTED_ENGAGE_SHIELDS(); // "🤖⚡ VOTON SAYS: NOT TODAY, BOT!"
    error SNIPER_PROTECTION_ACTIVATED(); // "🦸‍♂️ HERO MODE: Protecting honest believers from snipers!"
    error FEES_TOO_HIGH_SER(); // "That's robbery! Even we have standards"
    error NGMI_TOO_SMOL(); // "Dream bigger or go home! 🏠"
    error ALREADY_MOONED(); // "🌙 We already reached the moon, can't go back!"
    error INVALID_SWAP_THRESHOLD(); // "That threshold is more unrealistic than my dating standards"
    error ZERO_ADDRESS(); // "The void is not a valid destination, fren"

    // 📜 THE LEGENDARY TOKEN DETAILS
    string public name = "Voton"; // The hero we need, not the one we deserve
    string public symbol = "VOTE"; // Because every dream deserves a VOTE! 🗳️
    uint8 public immutable decimals = 18; // 18 decimals of pure hopium

    // 💰 THE DREAM VAULT
    uint256 public totalSupply; // 100B dreams ready to fund!
    mapping(address => uint256) public balanceOf; // Your piece of the dream pie 🥧
    mapping(address => mapping(address => uint256)) public allowance; // Permission slips for your tokens

    uint256 internal immutable INITIAL_CHAIN_ID;
    bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;
    mapping(address => uint256) public nonces;

    // 👑 THE DREAM TEAM ADDRESSES
    address public owner; // The current dream keeper
    address public feeReceiver; // Where the moon fuel goes ⛽
    address public swapRouter; // Our rocket ship to the moon 🚀
    address public lpPair; // The holy liquidity pool 💧
    address public swapToken; // Usually USDC, because even dreams need stability
    
    // 🎮 GAME SETTINGS (NOT FINANCIAL ADVICE, JUST VIBES)
    uint256 public maxBuyAmount; // Anti-whale technology 🐋❌
    uint256 public swapTokensAtAmount; // When to initiate moon protocol
    
    uint8 public sellFee = 5; // 5% paper hands tax 📄🙌
    uint8 public buyFee = 5; // 5% entry to the dream club 🎟️
    bool public botShieldActivated = true; // 🦸‍♂️ VOTON'S ANTI-BOT FORCE FIELD: ONLINE
    bool private moonMission; // 🚀 Currently mooning? (prevents re-entrancy during swaps)

    // 🎭 THE VIP LIST & SPECIAL PLACES
    mapping(address => bool) internal _isExcludedFromFee; // Fee immunity for the chosen ones
    mapping(address => bool) public ammPairs; // Where the magic happens 🪄

    /// @notice Only the dream keeper can call this, ser
    modifier onlyOwner() {
        if(msg.sender != owner)
            revert NOT_OWNER();
        _;
    }

    /// @notice GENESIS: WHERE DREAMS BEGIN 🌟
    /// @dev Deploys with 100B tokens because we're funding 100B dreams!
    constructor() {
        // 🎬 LIGHTS, CAMERA, DEPLOYMENT!
        INITIAL_CHAIN_ID = block.chainid;
        INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator();
        
        // 👑 Crown the deployer as the first dream keeper
        owner = msg.sender;
        feeReceiver = owner;
        _isExcludedFromFee[owner] = true;
        
        // 💰 MINT 100 BILLION DREAMS (we're not thinking small here!)
        _mint(owner, 100_000_000_000 ether);
        
        // 🦸‍♂️ ACTIVATE ANTI-BOT PROTECTION PROTOCOL
        maxBuyAmount = totalSupply / 300; // ~333M tokens max - Voton says: "Fair launch for all!"
        
        // 🚀 Set up our moon infrastructure
        swapRouter = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; // Uniswap V2 Router
        swapToken = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48; // USDC (for now)
        swapTokensAtAmount = totalSupply / 1000; // Auto-swap at 0.1% of supply
        
        // 🏊 Create the liquidity pool where dreams come true
        lpPair = IFactory(IRouter(swapRouter).factory()).createPair(address(this), swapToken);
        _isExcludedFromFee[address(this)] = true;
        ammPairs[lpPair] = true;
    }

    /// @notice Give someone permission to spend your dreams 🤝
    /// @param spender The lucky address getting spending rights
    /// @param amount How many dreams they can spend
    /// @return bool Always true, because we believe in trust
    function approve(
        address spender,
        uint256 amount
    ) public virtual returns (bool) {
        allowance[msg.sender][spender] = amount;
        emit Approval(msg.sender, spender, amount);
        return true;
    }

    /// @notice Send your dreams to another believer 📬
    /// @param to The recipient of your hopes and dreams
    /// @param amount How many dreams you're sharing
    /// @return bool True if dreams were successfully transferred
    /// @dev May trigger MOON PROTOCOL if conditions are met 🌙
    function transfer(
        address to,
        uint256 amount
    ) public virtual returns (bool) {
        balanceOf[msg.sender] -= amount;
        
        if(!moonMission && ammPairs[to] && !ammPairs[msg.sender]) {
            uint256 contractBalance = balanceOf[address(this)];
            if(contractBalance >= swapTokensAtAmount) {
                moonShot();
            }
        }
        
        unchecked {
            if(!_isExcludedFromFee[to] && !_isExcludedFromFee[msg.sender] && ammPairs[msg.sender]){
                    uint fee = (amount * buyFee) / 100;
                    if(botShieldActivated) {
                        // 🦸‍♂️ VOTON ACTIVATES ANTI-BOT SHIELD!
                        if(amount > maxBuyAmount) {
                            emit BotAlertTriggered(to, amount);
                            revert BOT_DETECTED_ENGAGE_SHIELDS();
                        }
                        // 🛡️ Stop snipers from hoarding the dream supply!
                        if(balanceOf[to] + amount > maxBuyAmount * 3)
                            revert SNIPER_PROTECTION_ACTIVATED();
                    }
                    amount -= fee;
                    balanceOf[to] += amount;
                    balanceOf[address(this)] += fee;
                    emit Transfer(msg.sender, address(this), fee);
            }
            else if(!_isExcludedFromFee[to] && !_isExcludedFromFee[msg.sender] && ammPairs[to]){
                    uint fee = (amount * sellFee) / 100;
                    amount -= fee;
                    balanceOf[to] += amount;
                    balanceOf[address(this)] += fee;
                    emit Transfer(msg.sender, address(this), fee);
            }
            else
                balanceOf[to] += amount;
        }
        if (to == address(0)) {
            unchecked {
                totalSupply -= 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];
        if (allowed != type(uint256).max)
            allowance[from][msg.sender] = allowed - amount;

        balanceOf[from] -= amount;
        
        if(!moonMission && ammPairs[to] && !ammPairs[from]) {
            uint256 contractBalance = balanceOf[address(this)];
            if(contractBalance >= swapTokensAtAmount) {
                moonShot();
            }
        }
        
        unchecked {
            if(!_isExcludedFromFee[to] && !_isExcludedFromFee[from] && ammPairs[to]){
                uint fee = (amount * sellFee) / 100;            
                amount -= fee;
                balanceOf[to] += amount;
                balanceOf[address(this)] += fee;
                emit Transfer(from, address(this), fee);
            }
            else
                balanceOf[to] += amount;
        }
        if (to == address(0)) {
            unchecked {
                totalSupply -= amount;
            }
        }
        emit Transfer(from, to, amount);
        return true;
    }

    function permit(
        address owner_,
        address spender_,
        uint256 value_,
        uint256 deadline_,
        uint8 v_,
        bytes32 r_,
        bytes32 s_
    ) public virtual {
        if(deadline_ < block.timestamp)
            revert PERMIT_DEADLINE_EXPIRED();
        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_
            );
            if(recoveredAddress == address(0) || recoveredAddress != owner_)
                revert INVALID_SIGNER();
            allowance[recoveredAddress][spender_] = value_;
        }
        emit Approval(owner_, spender_, value_);
    }

    function setFeeReceiver(address feeReceiver_) public onlyOwner {
        _isExcludedFromFee[feeReceiver_] = true;
        feeReceiver = feeReceiver_;
    }

    function renounceOwnership() public onlyOwner {
        owner = address(0);
        _isExcludedFromFee[msg.sender] = false;
        emit OwnershipTransferred(owner, address(0));
    }

    function transferOwnership(address newOwner_) public onlyOwner {
        address oldOwner = owner;
        _isExcludedFromFee[oldOwner] = false;
        owner = newOwner_;
        _isExcludedFromFee[owner] = true;
        emit OwnershipTransferred(oldOwner, newOwner_);
    }

    /// @notice Adjust the dream tax rates 💸
    /// @param _buyFee Entry fee to the dream club (max 35%)
    /// @param _sellFee Paper hands penalty (max 35%)
    /// @dev We're not greedy, 35% max because we're not villains
    function setFees(uint8 _buyFee, uint8 _sellFee) public onlyOwner {
        if( _buyFee > 35 || _sellFee > 35)
            revert FEES_TOO_HIGH_SER();
        buyFee = _buyFee;
        sellFee = _sellFee;
    }

    /// @notice 🎭 Grant VIP status - no fees for the chosen ones!
    /// @param account The address to bless (or curse)
    /// @param excluded True = VIP status, False = Back to paying like everyone else
    /// @dev Use wisely - with great power comes great memes
    function excludeFromFees(address account, bool excluded) public onlyOwner {
        _isExcludedFromFee[account] = excluded;
        // 🎉 Welcome to the VIP club (or goodbye, it was nice knowing you)
    }

    /// @notice 🎮 Adjust the bot protection threshold
    /// @param _maxBuyAmount New maximum buy amount
    /// @dev Warning: Setting this too low might anger the whales. Too high might invite bots!
    function setMaxBuyAmount(uint256 _maxBuyAmount) public onlyOwner {
        if(_maxBuyAmount < totalSupply / 300)
            revert NGMI_TOO_SMOL();
        maxBuyAmount = _maxBuyAmount;
    }

    /// @notice 🦸‍♂️ DEACTIVATE VOTON'S PROTECTIVE SHIELD
    /// @dev Once the bots are defeated, we can lower our defenses. This is PERMANENT!
    /// @dev "With great power comes great responsibility" - Uncle Voton
    function deactivateBotShield() public onlyOwner {
        if(!botShieldActivated)
            revert ALREADY_MOONED();
        botShieldActivated = false;
        emit BotShieldToggled(false); // 🦸‍♂️ Shield down - Voton trusts the community!
    }

    function setSwapTokensAtAmount(uint256 amount) external onlyOwner {
        if(amount < totalSupply / 100000 || amount > totalSupply / 100)
            revert INVALID_SWAP_THRESHOLD();
        swapTokensAtAmount = amount;
    }
    
    function setSwapToken(address token) external onlyOwner {
        if(token == address(0))
            revert ZERO_ADDRESS();
        swapToken = token;
    }
    
    function setSwapRouter(address router) external onlyOwner {
        if(router == address(0))
            revert ZERO_ADDRESS();
        swapRouter = router;
    }
    
    function setLpPair(address pair) external onlyOwner {
        if(pair == address(0))
            revert ZERO_ADDRESS();
        lpPair = pair;
    }
    
    /// @notice 🚨 EMERGENCY MOON BUTTON - Forces immediate swap
    /// @dev For when you absolutely need to moon RIGHT NOW
    function forceSwapBack() external onlyOwner {
        moonShot();
    }
    
    function setAmmPair(address pair, bool value) external onlyOwner {
        if(pair == address(0))
            revert ZERO_ADDRESS();
        ammPairs[pair] = 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)
                )
            );
    }

    /// @notice Creates dreams out of thin air ✨
    /// @param to The lucky recipient of new dreams
    /// @param amount How many dreams to manifest
    /// @dev Only used during contract deployment - we're not the Fed!
    function _mint(address to, uint256 amount) internal virtual {
        totalSupply += amount;
        unchecked {
            balanceOf[to] += amount;
        }
        emit Transfer(address(0), to, amount);
    }

    /// @notice Burns tokens, sending them to Valhalla 🔥
    /// @param from The address sacrificing their tokens
    /// @param amount How many tokens to send to the shadow realm
    /// @dev Currently unused, but here for the culture
    function _burn(address from, uint256 amount) internal virtual {
        balanceOf[from] -= amount;
        unchecked {
            totalSupply -= amount;
        }
        emit Transfer(from, address(0), amount);
    }

    /// @notice 🚀 INITIATES MOON PROTOCOL - SWAPS ACCUMULATED FEES FOR STABLE COINS
    /// @dev This is where the magic happens. Buckle up, anon!
    function moonShot() private {
        uint256 balance = balanceOf[address(this)];
        if(balance == 0) return; // No fuel, no moon 😢
        
        moonMission = true; // 🚀 ENGAGING THRUSTERS
        emit MoonMissionInitiated(balance);
        
        if(balance > swapTokensAtAmount * 20) {
            balance = swapTokensAtAmount * 20;
        }
        
        // 🛤️ Set course for the moon (via USDC)
        address[] memory path = new address[](2);
        path[0] = address(this);
        path[1] = swapToken;
        
        // 🎫 Give router permission to spend our tokens
        allowance[address(this)][swapRouter] = balance;
        emit Approval(address(this), swapRouter, balance);
        
        // 🚀 BLAST OFF! Trade our tokens for stable coins
        IRouter(swapRouter).swapExactTokensForTokensSupportingFeeOnTransferTokens(
            balance,
            0, // We accept any amount of USDC (YOLO)
            path,
            feeReceiver,
            block.timestamp // Now or never!
        );
        
        moonMission = false; // 🛬 Landing complete
    }
}
/*
                                                                        .::::::::                   
                                                                      :#%%%%%%%%%%=                 
                                                                     -%%%%%%%%%%%%+                 
                                                                    +%%%%%%%%%%%%=                  
                              .-----:...................           +%%%%%%%%%%%%-                   
                             :--======-...................       .*%%%%%%%%%%%#:                    
                            :------====-..................      .*%%%%%%%%%%%#:                     
                          .::::--------=-................      .#%%%%%%%%%%%#.                      
                         .::::::::--------..............      :%%%%%%%%%%%%*                        
                        ...:::::::::::-----...........       =%%%%%%%%%%%%=                         
                         .....::::::::::     ........       =%%%%%%%%%%%%-                          
                          ........:::::.      ......       +%%%%%%%%%%%%-                           
                           ..........::.       ....      .*%%%%%%%%%%%#:                            
                             ............       ..      .#%%%%%%%%%%%#.                             
                              ............             :%%%%%%%%%%%%*                               
                               ............           -%%%%%%%%%%%%+                                
                                .............        =%%%%%%%%%%%%=                                 
                                 .............      =%%%%%%%%%%%%=                                  
                                  ..............  .*%%%%%%%%%%%%-                                   
                                   ............:#%%%%%%%%%%%%%%.                                    
                                    .............*%%%%%%%%%%%#.                                     
                                      ............+%%%%%%%%%+                                       
                                       ............=%%%%%%%+                                        
                                        ............-%%%%%+                                         
                                         .............:::                                           
                                          ..............                                            
                                            ..........          

*/
Compiler settingsShow
{
  "libraries": {},
  "optimizer": {
    "runs": 200,
    "enabled": true
  }
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.