# Help needed to create a smart contract for bep 20 airdrop contract

**URL:** <https://forum.openzeppelin.com/t/help-needed-to-create-a-smart-contract-for-bep-20-airdrop-contract/43884>\
**Category:** Smart Contracts\
**Tags:** erc20, solidity\
**Created:** [April 20, 2025, 3:44pm UTC](https://forum.openzeppelin.com/t/help-needed-to-create-a-smart-contract-for-bep-20-airdrop-contract/43884 "2025-04-20T15:44:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![timdavid](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/timdavid/32/22611_2.png) [@timdavid](https://forum.openzeppelin.com/u/timdavid)\
**Post date:** [April 20, 2025, 3:44pm UTC](https://forum.openzeppelin.com/t/help-needed-to-create-a-smart-contract-for-bep-20-airdrop-contract/43884/1 "2025-04-20T15:44:12Z")

</div>

how to add address in the airdrop smart contract  
how to add airdrop amount in smart contract ???  
pls guide me

```auto
 SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

contract AirdropContractTest {

    event AirdropCoins(address indexed from, address[] to, uint256[] amount);

    /**
    * @dev Batch transfer ERC20 tokens to a list of recipients.
    * @param token Address of the ERC20 contract.
    * @param recipients List of addresses to transfer the tokens to.
    * @param amount Amount of tokens to transfer to each recipient.
     */
    function batchTransferERC20(
        IERC20 token,
        address[] calldata recipients,
        uint256[] calldata amount
    ) external {
        uint256 recipientsLength = recipients.length; // Cache the length of the recipients
        // Sender must have enough tokens to send to recipients
        require(recipientsLength== amount.length, "Each recipient needs tokens");
        
        // Loop through all the recipients and send them the specified amount
        for (uint256 i = 0; i < recipientsLength; i++) {
            require(token.transfer(recipients[i], amount[i]));
        }

        emit AirdropCoins(msg.sender, recipients, amount);
    }
}

```

---

<div class="post-metadata">

**Author:** ![Skyge](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/skyge/32/343_2.png) [@Skyge](https://forum.openzeppelin.com/u/Skyge)\
**Post date:** [April 21, 2025, 12:55am UTC](https://forum.openzeppelin.com/t/help-needed-to-create-a-smart-contract-for-bep-20-airdrop-contract/43884/3 "2025-04-21T00:55:02Z")

</div>

Hi, welcome to the community! 👋

Seems like you want an airdrop contract, I think you can have a look at these docs:

- [MerkleProof](https://docs.openzeppelin.com/contracts/5.x/api/utils#MerkleProof)
- [BitMaps](https://docs.openzeppelin.com/contracts/5.x/api/utils#BitMaps)
