Cheap way to batch transfer or Airdrop token

Could someone help me to understand the cheapest / most efficient way to batch transfer or airdrop a pre-set amount of token to a list of wallets (about 10,000)?
OpenZeppelin's ERC20 mint contract is great, however, I could not find any way to do this.

This contract 0xc03f94e49c944c4f118c3f97af7cce8f01df9430 did somehow send thousands of "airdrop" transactions within the same block for a ridiculously cheap amount.

How can I re-produce this?
ERC-721 is also ok, if that will make it cheaper. Everything on Avalanche.

Any help appreciated.

That's the airdrop function:

function airdrop(address[] memory holders, uint256 amount) public payable {
        for (uint i=0; i<holders.length; i++) {
            emit Transfer(address(this), holders[i], amount);

I guess you need to put everyone in an array and just send it.

1 Like

Create a disperser smart contract, I can help you with that

I have a follow up question
How would I go about doing such a transfer for an airdop with ERC721A (where mint function does not have tokenID param, but quantity instead) where the tokens have not been minted yet and where I need to match specific token IDs to specific address (1 token for 1 address only)