I want to create an airdrop smart contract for my existing token. How can I do it? Is there any example? It should be simple just when people send 0 ETH will automatically received tokens and there should be functions for withdraw the tokens.
Do you mean a faucet? Where a user can request tokens?
You can create a simple contract holding tokens that has a faucet function that will transfer a number of your tokens to the caller, with the caller paying the gas fees.
You will need to decide how you want to restrict the calling of the faucet, such as only allowing a certain amount of tokens per account.
Right, I want a smart contract that transfer certain amount of token to everyone who sends 0 ETH to the contract and each address can only 1 time only.
You can create a contract that either holds or has the minter role of a token, that issues X tokens when a function is called and before issuing checks if that address is already listed as a claimer.
I would also very much like to implement a distribution faucet. Does OpenZeppelin have a ready-made solution? Or a function code example … Thanks.