# Code sharing

**URL:** <https://community.linea.build/t/code-sharing/9801>\
**Category:** Developer Support\
**Created:** [February 12, 2025, 11:16am UTC](https://community.linea.build/t/code-sharing/9801 "2025-02-12T11:16:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![asdf123coin](https://sea2.discourse-cdn.com/flex020/user_avatar/community.linea.build/asdf123coin/32/7348_2.png) [@asdf123coin](https://community.linea.build/u/asdf123coin)\
**Post date:** [February 12, 2025, 11:16am UTC](https://community.linea.build/t/code-sharing/9801/1 "2025-02-12T11:16:18Z")

</div>

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;
}

```

---

<div class="post-metadata">

**Author:** ![holy](https://avatars.discourse-cdn.com/v4/letter/h/ecb155/32.png) [@holy](https://community.linea.build/u/holy)\
**Post date:** [February 15, 2025, 6:05am UTC](https://community.linea.build/t/code-sharing/9801/2 "2025-02-15T06:05:56Z")

</div>

I believe this is the page for users to verify their contract on Lineascan: [Verify & Publish Contract Source Code | LineaScan](https://lineascan.build/verifyContract)

---

<div class="post-metadata">

**Author:** ![asdf123coin](https://sea2.discourse-cdn.com/flex020/user_avatar/community.linea.build/asdf123coin/32/7348_2.png) [@asdf123coin](https://community.linea.build/u/asdf123coin)\
**Post date:** [February 22, 2025, 9:48am UTC](https://community.linea.build/t/code-sharing/9801/3 "2025-02-22T09:48:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![0xroo](https://sea2.discourse-cdn.com/flex020/user_avatar/community.linea.build/0xroo/32/5801_2.png) [@0xroo](https://community.linea.build/u/0xroo)\
**Post date:** [February 26, 2025, 11:53am UTC](https://community.linea.build/t/code-sharing/9801/4 "2025-02-26T11:53:29Z")

</div>

could you share the contract address please

---

<div class="post-metadata">

**Author:** ![asdf123coin](https://sea2.discourse-cdn.com/flex020/user_avatar/community.linea.build/asdf123coin/32/7348_2.png) [@asdf123coin](https://community.linea.build/u/asdf123coin)\
**Post date:** [February 26, 2025, 12:15pm UTC](https://community.linea.build/t/code-sharing/9801/5 "2025-02-26T12:15:01Z")

</div>

0x1f52cA551c06b3b435A7c912446d0763fe74fA86 if you want i can alse send you some

---

<div class="post-metadata">

**Author:** ![0xroo](https://sea2.discourse-cdn.com/flex020/user_avatar/community.linea.build/0xroo/32/5801_2.png) [@0xroo](https://community.linea.build/u/0xroo)\
**Post date:** [February 27, 2025, 6:10am UTC](https://community.linea.build/t/code-sharing/9801/6 "2025-02-27T06:10:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![asdf123coin](https://sea2.discourse-cdn.com/flex020/user_avatar/community.linea.build/asdf123coin/32/7348_2.png) [@asdf123coin](https://community.linea.build/u/asdf123coin)\
**Post date:** [February 27, 2025, 6:46am UTC](https://community.linea.build/t/code-sharing/9801/7 "2025-02-27T06:46:02Z")

</div>

i understand thank you very much!
