Skip to content
Verified contractPartialMIT

KECH

Address0x07c06aba5ec1aa12f88dbe70a9c30c5d8eadb93d
Balance

0 ETH

 

Transactions

21

 

Compiler

solc 0.8.20

 

Same code

Only this contract

 

Details

Compiler
solc 0.8.20+commit.a1b79de6
Language
solidity
Optimization
Yes, 200 runs
License
MIT
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
23,033,576
Creation transaction
0x57942926f4…ca7507bbd6

KECH.sol

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

contract KECH {
    string public name = "KECH";
    string public symbol = "KECH";
    uint8 public decimals = 18;
    uint256 public totalSupply = 1_000_000_000 * 10 ** 18;

    address public owner;
    address public constant walletRevenus   = 0xF388AC12a5Bb7f93f292b9b9835eaaf0E284AA4C;
    address public constant walletMarketing = 0x4BA7C8a99b688F7a8a53ba534F09eb2Cd006a040;
    address public constant walletAsso      = 0x4d9D274F386B5E280e3Fd0a94F246888Aa07CC1c;

    uint256 public constant TAX_PERCENT = 5;

    mapping(address => uint256) public balanceOf;
    mapping(address => mapping(address => uint256)) public allowance;
    mapping(address => bool) public isExcludedFromTax;

    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);

    constructor() {
        owner = msg.sender;
        balanceOf[owner] = totalSupply;
        isExcludedFromTax[owner] = true;
    }

    modifier onlyOwner() {
        require(msg.sender == owner, "Not the owner");
        _;
    }

    function approve(address spender, uint256 value) external returns (bool) {
        allowance[msg.sender][spender] = value;
        emit Approval(msg.sender, spender, value);
        return true;
    }

    function transfer(address to, uint256 value) external returns (bool) {
        _transfer(msg.sender, to, value);
        return true;
    }

    function transferFrom(address from, address to, uint256 value) external returns (bool) {
        require(allowance[from][msg.sender] >= value, "Allowance too low");
        allowance[from][msg.sender] -= value;
        _transfer(from, to, value);
        return true;
    }

    function _transfer(address from, address to, uint256 value) internal {
        require(balanceOf[from] >= value, "Balance too low");

        uint256 taxAmount = 0;
        if (!isExcludedFromTax[from] && !isExcludedFromTax[to]) {
            taxAmount = (value * TAX_PERCENT) / 100;

            uint256 taxRevenus   = (taxAmount * 60) / 100; // 3 %
            uint256 taxMarketing = (taxAmount * 20) / 100; // 1 %
            uint256 taxAsso      = taxAmount - taxRevenus - taxMarketing; // 1 %

            balanceOf[walletRevenus] += taxRevenus;
            balanceOf[walletMarketing] += taxMarketing;
            balanceOf[walletAsso] += taxAsso;

            emit Transfer(from, walletRevenus, taxRevenus);
            emit Transfer(from, walletMarketing, taxMarketing);
            emit Transfer(from, walletAsso, taxAsso);
        }

        uint256 amountAfterTax = value - taxAmount;
        balanceOf[from] -= value;
        balanceOf[to] += amountAfterTax;

        emit Transfer(from, to, amountAfterTax);
    }

    function excludeFromTax(address account, bool excluded) external onlyOwner {
        isExcludedFromTax[account] = excluded;
    }

    function renounceOwnership() external onlyOwner {
        owner = address(0);
    }
}
Compiler settingsShow
{
  "libraries": {},
  "optimizer": {
    "runs": 200,
    "enabled": true
  }
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.