Skip to content

A smart contract for efficiently conducting bulk transfers of MARK tokens on the Arbitrum One network.

License

Notifications You must be signed in to change notification settings

MchainNetwork/airdrop-contract

Repository files navigation

Airdrop Contract

This repository contains a smart contract for conducting ERC20 token airdrops, specifically designed and utilized for the airdrops of MARK tokens on the Arbitrum One network. The contract allows users to send a specific ERC20 token to multiple recipients in a single transaction, ensuring efficiency and cost-effectiveness.

Features

  • Allows sending ERC20 tokens to multiple recipients in a single transaction.
  • Includes a function to recover accidental tokens sent to the contract.
  • Utilizes OpenZeppelin's SafeERC20 library for safe token transfers.

Prerequisites

Installation

  1. Clone this repository:
git clone https://github.com/MchainNetwork/airdrop-contract.git
cd airdrop-contract
  1. Install the dependencies:
npm install
  1. Copy the .env.example file to a new .env file and update the environment variables as needed:
cp .env.example .env

Content of the .env.example file:

DEPLOYER_ADDRESS=0xYourDeployerAddressHere
TOKEN_ADDRESS=0xYourTokenAddressHere

Ensure to replace 0xYourDeployerAddressHere and 0xYourTokenAddressHere with your actual addresses.

Deployment

  1. Compile the contracts:
truffle compile
  1. Deploy the contracts to the desired network:
truffle migrate --network <network-name>

Usage

To conduct an airdrop, call the bulkTransfer function with the following parameters:

  • recipients: An array of Ethereum addresses you want to send the tokens to.
  • amounts: An array of token amounts you want to send to each corresponding recipient.

Ensure you have approved enough tokens for the contract before calling bulkTransfer.

Testing

To run the unit tests, start Ganache and execute:

truffle test

Deployed Contract

0x731670572D5aF7876031c68a3F87C2445CbBF823

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A smart contract for efficiently conducting bulk transfers of MARK tokens on the Arbitrum One network.

Resources

License

Stars

Watchers

Forks