Contract Functions

DropERC1155

An ERC-1155 contract that allows for the distribution of tokens to a list of recipients.

Version 5.3.6

DropERC1155 Contract

The DropERC1155 contract is an ERC-1155 implementation that enables the distribution of tokens to a predefined list of recipients. This is useful for airdrops, giveaways, and other scenarios where you want to distribute tokens to a specific set of addresses.

Features

  • Allows for the distribution of tokens to a list of recipients.
  • Supports the specification of token amounts for each recipient.
  • Includes a claim functionality for recipients to receive their tokens.
  • Provides a way to check the claiming status of a recipient.
  • Usage

    To use the DropERC1155 contract, you need to:

    <li>Deploy the contract.</li> <li>Initialize the contract with the list of recipients and their respective token amounts.</li> <li>Allow recipients to claim their tokens.</li>

    Implementation Details

    The DropERC1155 contract inherits from the ERC1155 contract and implements the necessary logic for token distribution and claiming.

    Best Practices

  • Ensure that the list of recipients is properly validated before deployment.
  • Consider adding a timelock mechanism to prevent immediate claims.
  • Implement appropriate security measures to prevent malicious attacks.
  • Functions

    constructor

    constructor(address _defaultAdmin, string _name, string _symbol, address[] memory _initialReceivers, uint256[] memory _initialAmounts)

    claim

    claim(uint256 _tokenId, uint256 _amount)

    setReceivers

    setReceivers(address[] memory _receivers, uint256[] memory _amounts)
    Ask about contract functions, security, or implementation details

    Press Enter to send your query

    Source Code

    1