thirdweb

AirdropERC1155

Polygon
polygonscandexguru
Code Snippets

Airdrop

(airdrop)

nonpayable

_tokenAddress

_tokenOwner

_recipients

Input should be passed in JSON format - Ex: ["0x..."]

_amounts

Input should be passed in JSON format - Ex: ["0"]

_tokenIds

Input should be passed in JSON format - Ex: ["0"]

Connect Wallet

Use this function in your app


import { prepareContractCall, sendTransaction } from "thirdweb"; const transaction = await prepareContractCall({ contract, method: "function airdrop(address _tokenAddress, address _tokenOwner, address[] _recipients, uint256[] _amounts, uint256[] _tokenIds)", params: [_tokenAddress, _tokenOwner, _recipients, _amounts, _tokenIds] }); const { transactionHash } = await sendTransaction({ transaction, account });