Code sharing

hello i would like to share this code in the way to can improve a token that run in a blockchain, whit autoburn and tax mechanism of 0.15% and anti bot detector, i never was able to try the anibot but if someone know how to try it and what to share is very well recived… if someone can tell me what he think about it would be really nice and i would like to know what i need to do to can verify a contract in the Linea scan…

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

import “OpenZeppelin/openzeppelin-contracts/blob/release-v4.4/contracts/token/ERC20/ERC20.sol”;

contract DogeInuAI2 is ERC20 {
uint256 private _maxTokensPerWallet = 8000000000 * 10**18; // 8 billion tokens

address private _owner;
mapping(address => bool) private _bots;
mapping(bytes32 => bool) private _processedTransactions; // Keep track of processed transactions


uint256 private _totalBurnt;
uint256 private _taxRate = 100; // 0.1% tax rate
uint256 private _burnRate = 50; // 0.05% burn rate

constructor() ERC20("Doge Inu AI2", "AINU2") {
    _mint(msg.sender, 8000000000000000 * 10**18); // 8 quadrillion tokens
    _owner = msg.sender;
}

function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
    require(!_bots[msg.sender], "Sender address is flagged as bot");
    require(!_bots[recipient], "Recipient address is flagged as bot");
    require(balanceOf(recipient) + amount <= _maxTokensPerWallet, "Recipient wallet exceeds max token limit");

    uint256 taxAmount = amount * _taxRate / 10_000;
    uint256 burnAmount = amount * _burnRate / 10_000;
    uint256 transferAmount = amount - taxAmount - burnAmount;

    _totalBurnt += burnAmount;
    _burn(msg.sender, burnAmount);
    _transfer(msg.sender, _owner, taxAmount);
    _transfer(msg.sender, recipient, transferAmount);

    return true;
}

function addBot(address botAddress) public {
    require(msg.sender == _owner, "Only contract owner can add bots");
    _bots[botAddress] = true;
}

function removeBot(address botAddress) public {
    require(msg.sender == _owner, "Only contract owner can remove bots");
    _bots[botAddress] = false;
}

function getMaxTokensPerWallet() public view returns (uint256) {
    return _maxTokensPerWallet;
}

function getTotalBurnt() public view returns (uint256) {
    return _totalBurnt;
}
3 Likes

I believe this is the page for users to verify their contract on Lineascan: Verify & Publish Contract Source Code | LineaScan

3 Likes

yeah the thing is that idk how to get aprove the verification because when i compile the code on remix is everything fine but on the verification of my code on any scan, of any blockchain show errors… but i am sure is because i am noob on it, for sure a developer can get it verificated easy

2 Likes

could you share the contract address please

0x1f52cA551c06b3b435A7c912446d0763fe74fA86 if you want i can alse send you some

@asdf123coin thanks for sharing the contract address if you tried this form: Verify & Publish Contract Source Code | LineaScan and had some issues the next step would be to contact etherscan.io they are the ones managing https://lineascan.build/

1 Like

i understand thank you very much!

2 Likes