How to create a token with airdrop and lock airdrop 3 months?

Dear Support,

I want to build a new contract with Airdrop feature, all tokens of airdrop will be locked transfer in 3 months. Which functional should be included?

  1. After airdropping certain amounts of token to their wallets, I want to lock that particular tokens so it won’t be withdrawn immediately liquidity is added till after 3 months.
  2. Contract that burns 2% of token in every transaction
  3. Contract that adds 5% to liquidity automatically in every transaction.
  4. Contract that charges 3% fee of every transaction
  5. Contract that redistribute 2% to holders.

Below is my code:

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./ERC20.sol";
import "./ERC20Burnable.sol";
import "./Pausable.sol";
import "./Ownable.sol";

contract New Token is ERC20, ERC20Burnable, Pausable, Ownable {
    constructor() ERC20("New Token", "NEWTOKEN") {
        _mint(msg.sender, 100000000 * 10 ** decimals());
    }

    function pause() public onlyOwner {
        _pause();
    }

    function unpause() public onlyOwner {
        _unpause();
    }

    function _beforeTokenTransfer(address from, address to, uint256 amount)
        internal
        whenNotPaused
        override
    {
        super._beforeTokenTransfer(from, to, amount);
    }
}

Hey @SiwelNivek
you are asking many things and from what I see your code is still basic. I suggest to open a topic in #smart-contracts:developer-wanted section or try to learn by your self starting from basis.
I can give few inputs:

  1. For the reflection fee you can start checking how safemoon does it (I am not saying you have to copy it)
  2. The same for the other fees.
  1. To airdrop token automatically you can use a for cycle to bulksend tokens to an array of addresses. Then using a mapping mapping(address => uint256) lockedTokens you can track the tokens that you want to be locked for each user. So inside the airdrop function you have to record each balance for each user.
    Once done, inside the transfer function you have to add a check, like a require where you check if that user can transfer that amount of tokens
1 Like

Thanks for your suggestion