πAdToken.sol
as of June 19 2024
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract AdToken is ERC20, Ownable {
uint256 public constant AIRDROP_AMOUNT = 1000 * 10**18;
constructor() ERC20("AdToken", "ADT") {
_mint(msg.sender, 1000000 * 10**18); // Initial supply
}
function airdrop(address to) public onlyOwner {
require(balanceOf(owner()) >= AIRDROP_AMOUNT, "Not enough tokens");
_transfer(owner(), to, AIRDROP_AMOUNT);
}
}
Advertising Token Contract
This contract creates a token to incentivize companies to use the platform, with an airdrop mechanism.
Key Features:
Minting new tokens.
Airdropping tokens.
Tokenomics breakdown.
Last updated