This is a simple Ethereum smart contract designed for distributing tokens to a list of addresses. The contract allows the owner to specify the token address, the airdrop amount, and to perform an airdrop to a list of recipient addresses. Additionally, the owner can withdraw any remaining tokens from the contract.
- Set the token address and airdrop amount.
- Airdrop tokens to a list of recipient addresses.
- Withdraw any remaining tokens from the contract.
- Contract Address: [Contract Address]
- Token Address: [Token Address]
-
Deploy the Airdrop Contract on the Ethereum network using Remix or your preferred development environment.
-
Set the token address and airdrop amount using the contract functions:
setTokenAddress(address _tokenAddress)
: Set the token address.setAirdropAmount(uint256 _airdropAmount)
: Set the airdrop amount.
-
Perform the airdrop:
- Call the
airdrop
function with an array of recipient addresses to distribute tokens evenly among them. Ensure that the contract has a sufficient token balance for the airdrop.
- Call the
-
Withdraw remaining tokens:
- Use the
withdraw
function to withdraw any remaining tokens from the contract.
- Use the
To develop and deploy this contract, follow these steps:
-
Write the contract in Solidity, specifying the ERC20 token interface (if not already available).
-
Deploy the contract to the Ethereum network.
-
Use Remix or other Ethereum development tools to interact with the contract, set the token address and airdrop amount, and perform the airdrop.
-
Verify the contract on Etherscan for transparency.
-
Ensure that you are the owner of the contract, and no one else can access your contract's private keys.
-
Verify the contract's functionality and test it with a smaller set of addresses before performing a large-scale airdrop.
This contract is provided under the MIT license.
For questions or support, contact @alanwiz_eth.