Monad Multisender

by YahyaOsi

How to Use This Tool

This tool requires you to deploy a smart contract first. Follow these steps carefully.

1

Deploy the Smart Contract

  1. Go to Remix IDE.
  2. Create a new file named `ERC20Multisender.sol`.
  3. Copy the code below and paste it into the file.
  4. From the "Solidity Compiler" tab, click "Compile".
  5. From the "Deploy & Run" tab, select `Injected Provider - MetaMask` and ensure you are on the Monad Testnet.
  6. Click "Deploy" and approve the transaction in MetaMask.
  7. After deployment, copy the Deployed Contract Address to use in the tool below.

Smart Contract Code (ERC20Multisender.sol)

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/token/ERC20/IERC20.sol";

contract ERC20Multisender {
    event TokensDispersed(address indexed token, uint256 totalAmount);

    function disperseToken(
        address tokenAddress,
        address[] calldata recipients,
        uint256[] calldata amounts
    ) external {
        require(recipients.length == amounts.length, "Arrays must be equal length.");
        require(recipients.length > 0, "Must have at least one recipient.");

        IERC20 token = IERC20(tokenAddress);
        uint256 totalAmount = 0;
        for (uint i = 0; i < amounts.length; i++) {
            totalAmount += amounts[i];
        }

        token.transferFrom(msg.sender, address(this), totalAmount);

        for (uint i = 0; i < recipients.length; i++) {
            token.transfer(recipients[i], amounts[i]);
        }

        emit TokensDispersed(tokenAddress, totalAmount);
    }
}
2

Use the DApp

Now that you have the contract address, you can use the tool below.

  1. Click "Connect Wallet" and ensure you're on the Monad network.
  2. Paste your copied Contract Address into the "Multisender Contract Address" field.
  3. Fill out the other fields and execute the "Approve" and then "Disperse" transactions.

Multisender DApp