Skip to content
Verified contractExactMIT

ArgAirdrop

Address0xeaa6cc3dd9348c6d0608482eb7185ab5e93f021c
Balance

0 ETH

 

Transactions

18

 

Compiler

solc 0.8.26

 

Same code

2 more contracts

 

Details

Compiler
solc 0.8.26+commit.8a97fa7a
Language
solidity
Optimization
Yes, 200 runs
EVM version
cancun
Via IR
yes
License
MIT
Match
Exactcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
25,927,289
Creation transaction
0x12c9dbaea3…66776e5ee5
Main copy (most transactions)
0x82563465…4467a6b6

ArgAirdrop.sol

// SPDX-License-Identifier: MIT
pragma solidity 0.8.26;

/*
    ArgAirdrop: direct push distributor for 50% of ARGSTR supply.

    the dev wallet parks 500M ARGSTR here, then calls airdrop() in batches
    (script/airdrop.mjs) BEFORE launch, straight into every Argonaut holder's
    wallet from the snapshot. no claims, no merkle, no deadline.

    owner can sweep whatever is left at any time (recoverable by design).
*/

interface IERC20 {
    function transfer(address to, uint256 amount) external returns (bool);
    function balanceOf(address who) external view returns (uint256);
}

contract ArgAirdrop {
    IERC20 public token; // set once (token deploys after the infra)
    address public owner;
    uint256 public sent;        // total ARGSTR pushed out
    uint256 public recipients;  // wallets paid
    bool public finished;

    event Airdropped(uint256 batchRecipients, uint256 batchAmount, uint256 totalRecipients);
    event Finished(uint256 recipients, uint256 sent);
    event Swept(address to, uint256 amount);

    modifier onlyOwner() {
        require(msg.sender == owner, "owner");
        _;
    }

    constructor() {
        owner = msg.sender;
    }

    function setToken(address _token) external onlyOwner {
        require(address(token) == address(0), "set");
        token = IERC20(_token);
    }

    /// push one batch. reverts as a whole if any transfer fails (e.g. a
    /// recipient over the token's max wallet), so nothing is half-applied.
    function airdrop(address[] calldata to, uint256[] calldata amount) external onlyOwner {
        require(!finished, "finished");
        require(to.length == amount.length && to.length > 0, "length");
        uint256 batch;
        for (uint256 i = 0; i < to.length; i++) {
            require(token.transfer(to[i], amount[i]), "transfer");
            batch += amount[i];
        }
        sent += batch;
        recipients += to.length;
        emit Airdropped(to.length, batch, recipients);
    }

    function finish() external onlyOwner {
        finished = true;
        emit Finished(recipients, sent);
    }

    /// pull whatever is left (dust, or everything if aborted).
    function sweep(address to) external onlyOwner {
        uint256 b = token.balanceOf(address(this));
        require(token.transfer(to, b), "transfer");
        emit Swept(to, b);
    }

    function rescueERC20(address t, address to, uint256 amount) external onlyOwner {
        require(IERC20(t).transfer(to, amount), "transfer");
    }

    function setOwner(address o) external onlyOwner {
        require(o != address(0), "zero");
        owner = o;
    }
}
Compiler settingsShow
{
  "viaIR": true,
  "optimizer": {
    "runs": 200,
    "enabled": true
  },
  "evmVersion": "cancun"
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.