Contract Functions

AirdropERC1155

This contract implements an airdrop mechanism for ERC1155 tokens, allowing the contract owner to distribute tokens to a list of recipients.

Version 0.1.3

AirdropERC1155 Contract

The AirdropERC1155 contract is a smart contract designed to facilitate airdrops of ERC1155 tokens to a predefined list of recipients. This allows for efficient and secure distribution of tokens to a large number of users.

Features

  • Airdrop functionality: Allows the contract owner to distribute ERC1155 tokens to a list of recipients.
  • Configurable token IDs and amounts: The contract supports airdropping multiple token IDs with specific quantities to each recipient.
  • Gas-efficient distribution: The airdrop process is optimized for gas efficiency, reducing the cost of distributing tokens.
  • Owner-controlled: Only the contract owner can initiate airdrop operations.
  • Usage

    To use the AirdropERC1155 contract, follow these steps:

    <li>Deploy the contract and set the ERC1155 token address.</li> <li>Call the 'addRecipients' function to add a list of recipients to the airdrop.</li> <li>Call the 'airdrop' function to distribute the tokens to the recipients.</li>

    Implementation Details

    The contract uses a mapping to store the list of recipients and their corresponding token amounts. The airdrop function iterates through the recipients list, transferring the appropriate tokens to each address.

    Best Practices

  • Ensure that the ERC1155 token contract has granted the AirdropERC1155 contract the necessary transfer permissions.
  • Thoroughly test the contract on a testnet before deploying it to a mainnet.
  • Consider using a gas optimization tool to minimize transaction costs during the airdrop.
  • Functions

    addRecipients

    addRecipients(address[],uint256[],uint256[])

    airdrop

    airdrop()

    setERC1155Token

    setERC1155Token(address)
    Ask about contract functions, security, or implementation details

    Press Enter to send your query

    Source Code

    1