Created
August 17, 2021 14:48
-
-
Save alexpvpmindustry/0ef9c28511d577ea197b31f66954a263 to your computer and use it in GitHub Desktop.
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.4+commit.c7e474f2.js&optimize=true&runs=200&gist=
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity 0.8.4; | |
// SPDX-License-Identifier: MIT | |
interface ierc20 { | |
function transfer(address recipient, uint256 amount) external returns (bool); | |
} | |
contract AirDropContract { | |
// contract adddress | |
address cAddr = 0x3C37ab18d0EC386d06dD68E3470e49bFDC0D46E8; | |
address _owner = 0x74Cd43787D10fD7247bCcaB93b2f7803b48c6e4f; | |
function setCAddr(address _counter) public { | |
require(msg.sender == _owner); | |
cAddr = _counter; | |
} | |
function airdrop(uint256 amount,address[] memory addresses) public { | |
require(msg.sender == _owner); | |
for (uint i=0;i< addresses.length;i++){ | |
ierc20(cAddr).transfer(addresses[i],amount); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment