airdrop
nonpayable
Use this function in your app
const response = await fetch('https://api.thirdweb.com/v1/contracts/write', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-secret-key': '<YOUR_SECRET_KEY>'
},
body: JSON.stringify({
calls: [
{
contractAddress: "0x84c91E27C23d802ebc73b644550C9ef24eC7A9A9",
method: "function airdrop(address _tokenAddress, address _tokenOwner, address[] _recipients, uint256[] _tokenIds)",
params: [_tokenAddress, _tokenOwner, _recipients, _tokenIds]
}
],
chainId: 1,
from: "<YOUR_WALLET_ADDRESS>"
})
});
const data = await response.json();