AirdropClaim

Description:

Multi-signature wallet contract requiring multiple confirmations for transaction execution.

Blockchain: Ethereum

Source Code: View Code On The Blockchain

Solidity Source Code:

{{
  "language": "Solidity",
  "sources": {
    "src/AirdropClaim.sol": {
      "content": "// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
                                                                                                                                               
/*

☞ https://ethos.vision
???? https://x.com/Ethereum_OS
✌︎ https://t.me/ethosportal

Welcome to the Ethereum Operating System — the first-of-its-kind revenue generating DeFi pumpware
built as a social DeFi sandbox that is filled with composable elements so you can create, trade,
communicate, and participate—all in one place.


                                                      @                               
                                                     @@:                              
                                                    @@@::                             
                                                  ==@@@::::                           
                                                 ===@@@:::::                          
                                                ===+@@+::::::                         
                                               ====@@@::::::::                        
                                              =====@@@:::::::::                       
                                             ======@@@::::::::::                      
                                            =======@@@:::::::::::                     
                                           =======*@@+::::::::::::                    
                                          ========@@@::::::::::::::                   
                                        ==========@@@::::::::::::::::                 
                                       ===========@@@:::::::::::::::::                
                                      ============@@@::::::::::::::::::               
                                     ============*@@=:::::::::::::::::::              
                                    =============@@@:::::::::::::::::::::             
                                   =====@@@======@@@::::::::@@@:::::::::::            
                                  ======@@@======@@@::::::::@@@::::::::::::           
                                 =======@@@======@@@::::::::@@@:::::::::::::          
                                =================@@=:::::::::::::::::::::::::         
                              ==================%@@::::::::::::::::::::::::::::       
                             ===================@@@:::::::::::::::::::::::::::::      
                            ====================@@@::::::::::::::::::::::::::::::     
                           =====================@@@:::::::::::::::::::::::::::::::    
                          =====================+@@-::::::::::::::::::::::::::::::::   
                         ======================@@@@@@@@@@@@@@*::::::::::::::::::::::  
                        =======================@@@@@@@@@@@@@@:::::::::::::::::::::::: 
                       ===================================@@@:::::::::::::::::::::::::
                         =================================@@@:::::::::::::::::::::::  
                          =========@@@@===================@@@::::::::@@@*::::::::::   
                           =========@@@@@@@==============*@@:::::%@@@@@:::::::::::    
                             ===========@@@@@@@@@@@#*+=+*@@@@@@@@@@@-:::::::::::      
                              ==============+@@@@@@@@@@@@@@@@@@@:::::::::::::::       
                               ==========================@@@::::::::::::::::::        
                                 ========================@@@::::::::::::::::          
                                  ======================@@@::::::::::::::::           
                                   =====================@@@:::::::::::::::            
                                     ===================@@@:::::::::::::              
                                      ==================@@@::::::::::::               
                                       ================*@@=:::::::::::                
                                         ==============@@@::::::::::                  
                                          =============@@@:::::::::                   
                                           ============@@@::::::::                    
                                             ==========@@#::::::                      
                                              ========@@@::::::                       
                                               =======@@@:::::                        
                                                 =====@@@:::                          
                                                  ====@@@::                           
                                                   ==*@@-:                            
                                                    =@@@:                             
                                                      @                 
                                                

                        
                                         @@@                                                                 
 @@@@@@@@@@@@@@@@@@@                 @@@@@@@                            =======                   ========   
  @@@@@@@@@@@@@@@@@@                   @@@@@                         ====     =====            =====   ===== 
    @@@@@         @@                   @@@@                       =====          ====         ====       === 
    @@@@@          @                   @@@@                      ====             =====      ====         ===
    @@@@@                              @@@@                     ====               =====     ====          ==
    @@@@@                  @@          @@@@                    =====               =====     =====           
    @@@@@       @        @@@@          @@@@      @             =====                =====    =======         
    @@@@@       @@     @@@@@@@@@@@@    @@@@  @@@@@@@@         =====                 =====     =========      
    @@@@@@@@@@@@@        @@@@          @@@@@@    @@@@@        =====                 =====       =========    
    @@@@@      @@        @@@@          @@@@@      @@@@@       =====                 =====         =========  
    @@@@@       @@       @@@@          @@@@        @@@@       =====                 =====           ======== 
    @@@@@                @@@@          @@@@        @@@@       ======                =====              ======
    @@@@@                @@@@          @@@@        @@@@        =====               =====                =====
    @@@@@                @@@@          @@@@        @@@@         =====              =====    ==          =====
    @@@@@           @@   @@@@          @@@@        @@@@          ====             =====     ===         =====
    @@@@@          @@@   @@@@@         @@@@        @@@@           =====          ====       ====        ==== 
   @@@@@@@@@@@@@@@@@@    @@@@@@@@@@   @@@@@@      @@@@@@            =====      ====          =====    =====  
@@@@@@@@@@@@@@@@@@@@       @@@@@@    @@@@@@@@@  @@@@@@@@@              ==========              =========     

   
*/ 

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "../interfaces/IEOS20.sol";

interface IAIR {
    function saidGM(address _user) external view returns (uint256);
    function totalGM() external view returns (uint256);
    function isAlive(address _user) external view returns (bool);
}
contract AirdropClaim is Ownable, ReentrancyGuard, Pausable {
  // Contracts
    IEOS20 public eos;
    IEOS20 public airdropToken;
  // States
    bool public claimAllowed = false;
    uint public airdropTokensSupply = 9_000_000e18;
    uint public gmBonusSupply = 1_000_000e18;
    uint public totalClaimed;
    uint public totalBonusClaimed;
  // Mappings
    mapping(address => uint256) public gmBonusPerUser;
    mapping(address => uint256) public gmBonusClaimed;
    mapping(address => uint256) public userClaimed;
  // Events    
    event TokensClaimed(address indexed user, uint256 amount);
    event BonusClaimed(address indexed user, uint256 amount);
  // Multicall
    struct AirdropInfo {
        bool claimAllowed;
        uint256 airdropTokensSupply;
        uint256 userClaimed;
        uint256 totalClaimed;
        uint256 tokenBalance;
        uint256 userAir;
        uint256 totalAir;
        uint256 airShare;
        uint256 eosShare;
        uint256 saidGM;
        uint256 totalGM;
        uint256 eosBalance;
        uint256 gmBonusPerUser;
        uint256 gmBonusClaimed;
        uint256 gmBonusSupply;
        uint256 totalBonusClaimed;
    }
    struct AirdropBonusInfo {
        address user;
        uint256 userBonus;
    }
    function multicall(address _user) external view returns (AirdropInfo memory) {
        return AirdropInfo({
            claimAllowed: claimAllowed,
            airdropTokensSupply: airdropTokensSupply,
            userClaimed: userClaimed[_user],
            totalClaimed: totalClaimed,
            tokenBalance: viewContractTokens(),
            userAir: airdropToken.balanceOf(_user),
            totalAir: airdropToken.totalSupply(),
            airShare: viewAirShare(_user),
            eosShare: viewEosTokensForShare(_user),
            eosBalance: eos.balanceOf(_user),
            saidGM: IAIR(address(airdropToken)).saidGM(_user),
            totalGM: IAIR(address(airdropToken)).totalGM(),
            gmBonusPerUser: gmBonusPerUser[_user],
            gmBonusClaimed: gmBonusClaimed[_user],
            gmBonusSupply: gmBonusSupply,
            totalBonusClaimed: totalBonusClaimed
            
        });
    }
    function balanceOf(address _user) public view returns (uint256) {
        return 0;
    }
  // View
    function viewContractTokens() public view returns (uint256) {
        return eos.balanceOf(address(this));
    }
    function viewAirShare(address _user) public view returns (uint256) {
        return airdropToken.balanceOf(_user)*1e18 / airdropToken.totalSupply();
    }
    function viewEosTokensForShare(address _user) public view returns (uint256) {
        return viewAirShare(_user) * airdropTokensSupply / 1e18;
    }
  // Claim
    function claim() external nonReentrant whenNotPaused {
        require(claimAllowed, "Claiming is not allowed");
        if(msg.sender != airdropToken.owner()){
        require(!IAIR(address(airdropToken)).isAlive(msg.sender), "User is alive");
        }
        require(userClaimed[msg.sender] == 0, "Already claimed");
        uint256 amount = viewEosTokensForShare(msg.sender);
        userClaimed[msg.sender] = amount;
        totalClaimed += amount;
        eos.transfer(msg.sender, amount);
        emit TokensClaimed(msg.sender, amount);
    }

    function claimBonus() external nonReentrant whenNotPaused {
        require(claimAllowed, "Claiming is not allowed");
        if(msg.sender != airdropToken.owner()){
        require(!IAIR(address(airdropToken)).isAlive(msg.sender), "User is alive");
        }

        uint256 entitled = gmBonusPerUser[msg.sender];
        uint256 claimed  = gmBonusClaimed[msg.sender];
        require(entitled > claimed, "No GM bonus");
        
        uint256 amount = entitled - claimed;
        gmBonusClaimed[msg.sender] = claimed + amount;  // FIX: accumulate
        totalBonusClaimed += amount;

        eos.transfer(msg.sender, amount);
        emit BonusClaimed(msg.sender, amount);
    }

  // Owner
    function setEOS(address _eos) public onlyOwner{
        require(address(_eos) != address(0), "Token address cannot be zero");
        eos = IEOS20(_eos);
    }
    function setAIR(address _airdropToken) public onlyOwner{
        require(address(_airdropToken) != address(0), "Token address cannot be zero");
        airdropToken = IEOS20(_airdropToken);
    }
    function setClaimAllowed(bool _claimAllowed) external onlyOwner {
        claimAllowed = _claimAllowed;
    }
    function addBonusUser(address _user, uint256 _amount) external onlyOwner {
        gmBonusPerUser[_user] = _amount;
    }
    function addBonusUserArray(AirdropBonusInfo[] memory users) external onlyOwner {
        for(uint i = 0; i < users.length; i++){
            gmBonusPerUser[users[i].user] = users[i].userBonus;
        }
    }
    function setBonus(uint256 _bonus) external onlyOwner {
        gmBonusSupply = _bonus;
    }
    function setAirdropTokensSupply(uint256 _airdropTokensSupply) external onlyOwner {
        airdropTokensSupply = _airdropTokensSupply;
    }
    function recoverTokens(IEOS20 _token, uint256 _amount) external onlyOwner {
        _token.transfer(owner(), _amount);
    }
    function recoverEth(uint _amount) external onlyOwner {
        (bool sent, ) = owner().call{value: _amount}("");
        require(sent, "ETH recovery failed");
    }
}"
    },
    "lib/openzeppelin-contracts/contracts/access/Ownable.sol": {
      "content": "// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}
"
    },
    "lib/openzeppelin-contracts/contracts/security/ReentrancyGuard.sol": {
      "content": "// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}
"
    },
    "lib/openzeppelin-contracts/contracts/security/Pausable.sol": {
      "content": "// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        require(paused(), "Pausable: not paused");
    }

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

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}
"
    },
    "interfaces/IEOS20.sol": {
      "content": "pragma solidity ^0.8.0;
interface IEOS20 {
  // FOR ETH OS
    function initializeToken(address owner, address router, address deployer, uint256 _devDeadline) external;
    function setSpecs(
        uint256 _devFeePercent,
        uint256 _maxDailyPumpRate,
        uint256 _reflectionsPercent,
        uint256 _liquidityPercent,
        uint256 _reaperDeathTime,
        uint256 _cooldown,
        uint256 _winAmountPercent,
        uint256 _apy,
        uint256 _burnPercentBuy,
        uint256 _burnPercentSell
    ) external;    
    function transferOwnershipOfTheToken(address) external;
    function openTrading(bool _tradingOpen) external;
    
    function name() external view returns (string memory);
    function symbol() external view returns (string memory);
    function owner() external view returns (address);
    function timeCreated() external view returns (uint256);
    function deploymentBlock() external view returns (uint);
    function uniswapV2Pair() external view returns (address);
    function uniswapV2Router() external view returns (address);
    
    function antiBot() external view returns (bool);
    function maxWalletPercent() external view returns (uint);
    
    function toggleYield(bool toggle) external;
    function tradingOpen() external view returns (bool);
    function yieldOn() external view returns (bool);

    function totalSupply() external view returns (uint256);
    function balanceOf(address account) external view returns (uint256);
    function allowance(address owner, address spender) external view returns (uint256);
    function transfer(address _to, uint256 _value) external returns (bool success);
    function transferFrom(address _from, address _to, uint256 _value) external returns (bool success);
    function approve(address _spender, uint256 _value) external returns (bool success);

    function totalShares() external view returns (uint256);
    function burn(uint256 _amount) external;
    function getReserves() external view returns (uint112, uint112);
    function getQuote(uint256 amountA, uint256 reserveA, uint256 reserveB) external view returns (uint256);
    function lastBuyTimestamp() external view returns (uint256);

    function reflectionsPercent() external view returns (uint256);
    function liquidityPercent() external view returns (uint256);
    function winAmountPercent() external view returns (uint256);
    function devFeePercent() external view returns (uint256);
    function burnPercentageBuy() external view returns (uint256);
    function burnPercentageSell() external view returns (uint256);
    function deathTime() external view returns (uint256);
    function apy() external view returns (uint256);

    function share(address user) external view returns (uint256);
    function shares(address user) external view returns (uint256);
    function ethAccumulated(address user) external view returns (uint256);
    function ethAccumulatedForUi(address _user) external view returns (uint256);
    function ethWithdrawn(address user) external view returns (uint256);
    function ethWithdrawnForUi(address user) external view returns (uint256);
    function totalEthDistributed() external view returns (uint256);
    function devWithdrawn() external view returns (uint256);
    function lpAdded() external view returns (uint256);

    function pendingPonziTokens(address _user) external view returns (uint256);
    function devClaimableEth() external view returns (uint256);
    function lastPumpTimestamp() external view returns (uint256);
    function maxDailyPumpRate() external view returns (uint256);
    function pumpIsPublic() external view returns (bool);

    function firstReceivedBlockTimeStamp(address) external view returns (uint256);
    function immortal(address _user) external view returns (bool);
    function deathStartedTimestamp() external view returns (uint256);
   
    function cooldown() external view returns (uint256);
    function winAmount() external view returns (uint256);
    function currentWinner() external view returns (address);

    function ponziStart() external view returns (uint256);
    function mintBonus(uint256 amount, address _user) external;
    
    function setMaxWallet(bool _antiBot, uint256 _maxWallet) external;
    function volumeAmount() external view returns (uint256);
    
}

"
    },
    "lib/openzeppelin-contracts/contracts/utils/Context.sol": {
      "content": "// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

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

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}
"
    }
  },
  "settings": {
    "remappings": [
      "forge-std/=lib/forge-std/src/",
      "@openzeppelin/=lib/openzeppelin-contracts/",
      "@ensdomains/=lib/v4-core/node_modules/@ensdomains/",
      "@uniswap/=lib/universal-router/node_modules/@uniswap/",
      "ds-test/=lib/forge-std/lib/ds-test/src/",
      "erc4626-tests/=lib/v4-core/lib/openzeppelin-contracts/lib/erc4626-tests/",
      "forge-gas-snapshot/=lib/permit2/lib/forge-gas-snapshot/src/",
      "hardhat/=lib/v4-core/node_modules/hardhat/",
      "openzeppelin-contracts/=lib/openzeppelin-contracts/",
      "permit2/=lib/permit2/",
      "solmate/=lib/universal-router/lib/solmate/",
      "universal-router/=lib/universal-router/",
      "v4-core/=lib/v4-core/src/",
      "v4-periphery/=lib/v4-periphery/"
    ],
    "optimizer": {
      "enabled": true,
      "runs": 200
    },
    "metadata": {
      "useLiteralContent": false,
      "bytecodeHash": "ipfs",
      "appendCBOR": true
    },
    "outputSelection": {
      "*": {
        "*": [
          "evm.bytecode",
          "evm.deployedBytecode",
          "devdoc",
          "userdoc",
          "metadata",
          "abi"
        ]
      }
    },
    "evmVersion": "paris",
    "viaIR": false
  }
}}

Tags:
ERC20, Multisig, Burnable, Liquidity, Yield, Multi-Signature, Factory|addr:0xf4b0d9430162e1157c08b82ddb1afbccf8ead441|verified:true|block:23382583|tx:0xe6c202237cf9719a600d4cbe48eb2d3fcb74ff6359fd69eab1bfd3925e95e2db|first_check:1758109565

Submitted on: 2025-09-17 13:46:07

Comments

Log in to comment.

No comments yet.