AirdropERC20

Ethereum
etherscanblockscout
Code Snippets

airdrop

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

The native currency value (in Ether) to send with this transaction (ex: 0.01 to send 0.01 native currency).

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: "0xc0af44010F82Cc62bd65A227E668367Fb2E5D334", method: "function airdrop(address _tokenAddress, address _tokenOwner, address[] _recipients, uint256[] _amounts) payable", params: [_tokenAddress, _tokenOwner, _recipients, _amounts] } ], chainId: 1, from: "<YOUR_WALLET_ADDRESS>" }) }); const data = await response.json();