Skip to content
Verified contractPartial

Airdrop

Address0xea200a1eabe9cae8e3084c84c0eb3ff0026e2ed2
Balance

0 ETH

 

Transactions

4

 

Compiler

solc 0.5.8

 

Same code

Only this contract

 

Details

Compiler
solc 0.5.8+commit.23d335f2
Language
solidity
Optimization
Yes, 200 runs
License
Not stated
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
7,859,716
Creation transaction
0x97344589f0…433d13d20c

Airdrop.sol

pragma solidity 0.5.8;

/**
 * @title ERC20 interface
 * @dev see https://eips.ethereum.org/EIPS/eip-20
 */
interface IERC20 {
    function transfer(address to, uint256 value) external returns (bool);

    function approve(address spender, uint256 value) external returns (bool);

    function transferFrom(address from, address to, uint256 value) external returns (bool);

    function totalSupply() external view returns (uint256);

    function balanceOf(address who) external view returns (uint256);

    function allowance(address owner, address spender) external view returns (uint256);
}

/**
 * @title ERC20 Airdrop dapp smart contract
 */
contract Airdrop {
  IERC20 private _token = IERC20(0x00FbE7398D9F0D53fBaef6E2F4C6Ab0e7c31f5D7);

  /**
   * @dev doAirdrop is the main method for distribution
   * by default, the contract gonna send 100 tokens per address
   * @param addresses array of addresses to airdrop
   */
  function doAirdrop(address[] calldata addresses) external returns (uint256) {
    uint256 i = 0;

    while (i < addresses.length) {
      _token.transferFrom(msg.sender, addresses[i], 100 * 1 ether);
      i += 1;
    }

    return i;
  }
}
Compiler settingsShow
{
  "optimizer": {
    "runs": 200,
    "enabled": true
  }
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.