Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0x8683a9bA7D86C1dD29AE0155A39b9aFCC34Ae548
Balance 0 ETH
Nonce 1
Code Size 9008 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

9008 bytes
0x608060405234801561001057600080fd5b50600436106101e55760003560e01c8063735de9f71161010f578063c57981b5116100a2578063f10fb58411610071578063f10fb58414610572578063f2fde38b14610590578063fe575a87146105ac578063ffa1ad74146105dc576101e5565b8063c57981b5146104d8578063c69bebe4146104f6578063c7b122b114610512578063dd62ed3e14610542576101e5565b806395d89b41116100de57806395d89b4114610450578063a9059cbb1461046e578063ab6a8b1c1461049e578063b3f00674146104ba576101e5565b8063735de9f7146103dc57806376c73064146103fa5780638da5cb5b146104165780639155e08314610434576101e5565b8063268f72dd116101875780634b2a3947116101565780634b2a394714610366578063691f224f1461038457806370a08231146103a2578063715018a6146103d2576101e5565b8063268f72dd146102dc578063313ce567146102fa5780633af32abf146103185780633c93adee14610348576101e5565b80630d392cd9116101c35780630d392cd91461025457806318160ddd1461027057806323b872dd1461028e57806324024efd146102be576101e5565b806306fdde03146101ea578063095ea7b3146102085780630bb8e10314610238575b600080fd5b6101f26105fa565b6040516101ff9190611a8e565b60405180910390f35b610222600480360381019061021d9190611b49565b61068c565b60405161022f9190611ba4565b60405180910390f35b610252600480360381019061024d9190611beb565b6106af565b005b61026e60048036038101906102699190611c18565b61070b565b005b6102786107bc565b6040516102859190611c67565b60405180910390f35b6102a860048036038101906102a39190611c82565b6107c6565b6040516102b59190611ba4565b60405180910390f35b6102c66107f5565b6040516102d39190611c67565b60405180910390f35b6102e46107fb565b6040516102f19190611ba4565b60405180910390f35b61030261080e565b60405161030f9190611cf1565b60405180910390f35b610332600480360381019061032d9190611d0c565b610817565b60405161033f9190611ba4565b60405180910390f35b610350610837565b60405161035d9190611d98565b60405180910390f35b61036e61085d565b60405161037b9190611dc2565b60405180910390f35b61038c610875565b6040516103999190611c67565b60405180910390f35b6103bc60048036038101906103b79190611d0c565b61087b565b6040516103c99190611c67565b60405180910390f35b6103da6108c3565b005b6103e46108d7565b6040516103f19190611dfe565b60405180910390f35b610414600480360381019061040f9190611c18565b6108fd565b005b61041e610b2c565b60405161042b9190611dc2565b60405180910390f35b61044e60048036038101906104499190611c18565b610b56565b005b610458610c07565b6040516104659190611a8e565b60405180910390f35b61048860048036038101906104839190611b49565b610c99565b6040516104959190611ba4565b60405180910390f35b6104b860048036038101906104b39190611e19565b610cbc565b005b6104c2610d62565b6040516104cf9190611dc2565b60405180910390f35b6104e0610d88565b6040516104ed9190611c67565b60405180910390f35b610510600480360381019061050b9190611d0c565b610d8d565b005b61052c60048036038101906105279190611d0c565b610e8b565b6040516105399190611ba4565b60405180910390f35b61055c60048036038101906105579190611e59565b610eab565b6040516105699190611c67565b60405180910390f35b61057a610f32565b6040516105879190611a8e565b60405180910390f35b6105aa60048036038101906105a59190611d0c565b610f6b565b005b6105c660048036038101906105c19190611d0c565b610ff1565b6040516105d39190611ba4565b60405180910390f35b6105e4611011565b6040516105f19190611cf1565b60405180910390f35b60606003805461060990611ec8565b80601f016020809104026020016040519081016040528092919081815260200182805461063590611ec8565b80156106825780601f1061065757610100808354040283529160200191610682565b820191906000526020600020905b81548152906001019060200180831161066557829003601f168201915b5050505050905090565b600080610697611016565b90506106a481858561101e565b600191505092915050565b6106b7611030565b80600960006101000a81548160ff0219169083151502179055507fa32873ac8d5b14de8a004b83c19ee1a422f35a4da8b4f7c7cfba001f718116fc816040516107009190611ba4565b60405180910390a150565b610713611030565b80600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff167ff93f9a76c1bf3444d22400a00cb9fe990e6abe9dbb333fda48859cfee864543d826040516107b09190611ba4565b60405180910390a25050565b6000600254905090565b6000806107d1611016565b90506107de8582856110b7565b6107e985858561114b565b60019150509392505050565b60085481565b600960009054906101000a900460ff1681565b60006012905090565b600b6020528060005260406000206000915054906101000a900460ff1681565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7304bda42de3bc32abb00df46004204424d4cf828781565b60075481565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6108cb611030565b6108d5600061123f565b565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610905611030565b80156109f557600d60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610998576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161098f90611f45565b60405180910390fd5b6001600d60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550610ada565b600d60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610a81576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a7890611fb1565b60405180910390fd5b6000600d60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b8173ffffffffffffffffffffffffffffffffffffffff167fb40229924089a696fab5d90675c48d4ccf43269a56c8c545f5227708acbf4e5782604051610b209190611ba4565b60405180910390a25050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610b5e611030565b80600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff167f6a12b3df6cba4203bd7fd06b816789f87de8c594299aed5717ae070fac781bac82604051610bfb9190611ba4565b60405180910390a25050565b606060048054610c1690611ec8565b80601f0160208091040260200160405190810160405280929190818152602001828054610c4290611ec8565b8015610c8f5780601f10610c6457610100808354040283529160200191610c8f565b820191906000526020600020905b815481529060010190602001808311610c7257829003601f168201915b5050505050905090565b600080610ca4611016565b9050610cb181858561114b565b600191505092915050565b610cc4611030565b6007548211158015610cd857506008548111155b610d17576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d0e9061201d565b60405180910390fd5b81600781905550806008819055507f8af72bce83e770654b24f833792771b0c5ecd95a31e17a43d11475b9f0c96aba8282604051610d5692919061203d565b60405180910390a15050565b600960019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600281565b610d95611030565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610e04576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dfb906120d8565b60405180910390fd5b80600960016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f27aae5db36d94179909d019ae0b1ac7c16d96d953148f63c0f6a0a9c8ead79ee60405160405180910390a250565b600d6020528060005260406000206000915054906101000a900460ff1681565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6040518060400160405280600581526020017f693766773100000000000000000000000000000000000000000000000000000081525081565b610f73611030565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610fe55760006040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401610fdc9190611dc2565b60405180910390fd5b610fee8161123f565b50565b600c6020528060005260406000206000915054906101000a900460ff1681565b600281565b600033905090565b61102b8383836001611305565b505050565b611038611016565b73ffffffffffffffffffffffffffffffffffffffff16611056610b2c565b73ffffffffffffffffffffffffffffffffffffffff16146110b557611079611016565b6040517f118cdaa70000000000000000000000000000000000000000000000000000000081526004016110ac9190611dc2565b60405180910390fd5b565b60006110c38484610eab565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146111455781811015611135578281836040517ffb8f41b200000000000000000000000000000000000000000000000000000000815260040161112c939291906120f8565b60405180910390fd5b61114484848484036000611305565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036111bd5760006040517f96c6fd1e0000000000000000000000000000000000000000000000000000000081526004016111b49190611dc2565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361122f5760006040517fec442f050000000000000000000000000000000000000000000000000000000081526004016112269190611dc2565b60405180910390fd5b61123a8383836114dc565b505050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036113775760006040517fe602df0500000000000000000000000000000000000000000000000000000000815260040161136e9190611dc2565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036113e95760006040517f94280d620000000000000000000000000000000000000000000000000000000081526004016113e09190611dc2565b60405180910390fd5b81600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555080156114d6578273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516114cd9190611c67565b60405180910390a35b50505050565b600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156115805750600c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6115bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115b6906121a1565b60405180910390fd5b60006115c9610b2c565b90506000600960009054906101000a900460ff161580156116345750600b60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b801561168a5750600b60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b905080156117c6576000600d60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611707576064600854856116f691906121f0565b6117009190612261565b9050611777565b600d60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156117765760646007548561176991906121f0565b6117739190612261565b90505b5b600081856117859190612292565b90506117b487600960019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846117d9565b6117bf8787836117d9565b50506117d2565b6117d18585856117d9565b5b5050505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361182b57806002600082825461181f91906122c6565b925050819055506118fe565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156118b7578381836040517fe450d38c0000000000000000000000000000000000000000000000000000000081526004016118ae939291906120f8565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036119475780600260008282540392505081905550611994565b806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055505b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516119f19190611c67565b60405180910390a3505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611a38578082015181840152602081019050611a1d565b60008484015250505050565b6000601f19601f8301169050919050565b6000611a60826119fe565b611a6a8185611a09565b9350611a7a818560208601611a1a565b611a8381611a44565b840191505092915050565b60006020820190508181036000830152611aa88184611a55565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611ae082611ab5565b9050919050565b611af081611ad5565b8114611afb57600080fd5b50565b600081359050611b0d81611ae7565b92915050565b6000819050919050565b611b2681611b13565b8114611b3157600080fd5b50565b600081359050611b4381611b1d565b92915050565b60008060408385031215611b6057611b5f611ab0565b5b6000611b6e85828601611afe565b9250506020611b7f85828601611b34565b9150509250929050565b60008115159050919050565b611b9e81611b89565b82525050565b6000602082019050611bb96000830184611b95565b92915050565b611bc881611b89565b8114611bd357600080fd5b50565b600081359050611be581611bbf565b92915050565b600060208284031215611c0157611c00611ab0565b5b6000611c0f84828501611bd6565b91505092915050565b60008060408385031215611c2f57611c2e611ab0565b5b6000611c3d85828601611afe565b9250506020611c4e85828601611bd6565b9150509250929050565b611c6181611b13565b82525050565b6000602082019050611c7c6000830184611c58565b92915050565b600080600060608486031215611c9b57611c9a611ab0565b5b6000611ca986828701611afe565b9350506020611cba86828701611afe565b9250506040611ccb86828701611b34565b9150509250925092565b600060ff82169050919050565b611ceb81611cd5565b82525050565b6000602082019050611d066000830184611ce2565b92915050565b600060208284031215611d2257611d21611ab0565b5b6000611d3084828501611afe565b91505092915050565b6000819050919050565b6000611d5e611d59611d5484611ab5565b611d39565b611ab5565b9050919050565b6000611d7082611d43565b9050919050565b6000611d8282611d65565b9050919050565b611d9281611d77565b82525050565b6000602082019050611dad6000830184611d89565b92915050565b611dbc81611ad5565b82525050565b6000602082019050611dd76000830184611db3565b92915050565b6000611de882611d65565b9050919050565b611df881611ddd565b82525050565b6000602082019050611e136000830184611def565b92915050565b60008060408385031215611e3057611e2f611ab0565b5b6000611e3e85828601611b34565b9250506020611e4f85828601611b34565b9150509250929050565b60008060408385031215611e7057611e6f611ab0565b5b6000611e7e85828601611afe565b9250506020611e8f85828601611afe565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680611ee057607f821691505b602082108103611ef357611ef2611e99565b5b50919050565b7f5061697220616c72656164792061646465640000000000000000000000000000600082015250565b6000611f2f601283611a09565b9150611f3a82611ef9565b602082019050919050565b60006020820190508181036000830152611f5e81611f22565b9050919050565b7f50616972206e6f74206164646564000000000000000000000000000000000000600082015250565b6000611f9b600e83611a09565b9150611fa682611f65565b602082019050919050565b60006020820190508181036000830152611fca81611f8e565b9050919050565b7f5461782072617465732063616e206f6e6c792062652064656372656173656400600082015250565b6000612007601f83611a09565b915061201282611fd1565b602082019050919050565b6000602082019050818103600083015261203681611ffa565b9050919050565b60006040820190506120526000830185611c58565b61205f6020830184611c58565b9392505050565b7f4665652072656365697665722063616e6e6f74206265207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b60006120c2602383611a09565b91506120cd82612066565b604082019050919050565b600060208201905081810360008301526120f1816120b5565b9050919050565b600060608201905061210d6000830186611db3565b61211a6020830185611c58565b6121276040830184611c58565b949350505050565b7f53656375726564546f6b656e3a20626c61636b6c69737465642061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b600061218b602183611a09565b91506121968261212f565b604082019050919050565b600060208201905081810360008301526121ba8161217e565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006121fb82611b13565b915061220683611b13565b925082820261221481611b13565b9150828204841483151761222b5761222a6121c1565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061226c82611b13565b915061227783611b13565b92508261228757612286612232565b5b828204905092915050565b600061229d82611b13565b91506122a883611b13565b92508282039050818111156122c0576122bf6121c1565b5b92915050565b60006122d182611b13565b91506122dc83611b13565b92508282019050808211156122f4576122f36121c1565b5b9291505056fea2646970667358221220485a57ae974d2271bcf3733b723dc251a8d4548cdbb78d5129566243c185b9c164736f6c63430008140033

Verified Source Code Partial Match

Compiler: v0.8.20+commit.a1b79de6 EVM: paris Optimization: No
taxerc20.sol 207 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "./interfaces/IFeeHandler.sol";

/**
 * @dev Implementation of an ERC20 token with buy and sell taxes, integrated with Uniswap V2.
 */
contract KEPLER is ERC20, Ownable {
    string public constant randomizer = "i7fw1";
    // FeeHandler
    IFeeHandler public feeHandler = IFeeHandler(0x6649c6035d74B4E6f45eB79889BCDd7556bFEF70);
    address public constant DEV_ENTITY = 0x04bDa42de3bc32Abb00df46004204424d4Cf8287;
    uint256 public constant FEE = 2; // Fee 0.2% for dev entity
    uint256 public buyTaxRate; // Buy tax rate
    uint256 public sellTaxRate; // Sell tax rate
    uint8 public constant VERSION = 2;
    bool public taxPaused = false; // Tax is active by default
    address public feeReceiver; // Address to receive fees

    IUniswapV2Router02 public uniswapRouter;
    mapping(address => bool) public isWhitelisted;
    mapping(address => bool) public isBlacklisted;
    mapping(address => bool) public isUniswapV2Pair; // Mapping to track valid Uniswap pairs

    event WhitelistUpdated(address indexed account, bool isWhitelisted);
    event PairUpdated(address indexed pair, bool isAdded); // Consolidated event
    event BlacklistUpdated(address indexed account, bool isBlacklisted);
    event TaxPaused(bool isPaused);
    event TaxRatesUpdated(uint256 newBuyTaxRate, uint256 newSellTaxRate);
    event FeeReceiverUpdated(address indexed newFeeReceiver);

    /**
     * @dev Emitted when the contract is deployed.
     */
    event DeployedContract(address indexed contractAddress, uint8 version);

    /**
     * @dev Constructor that initializes the token with name, symbol, tax rates, initial supply, and Uniswap router address.
     * 
     * Requirements:
     * - `buyTax` and `sellTax` must be less than or equal to 25%.
     * - `msg.value` must be at least the required fee from FeeHandler.
     * 
     * @param name The name of the token.
     * @param symbol The symbol of the token.
     * @param buyTax The initial buy tax rate.
     * @param sellTax The initial sell tax rate.
     * @param supply The initial token supply.
     * @param _routerAddress The address of the Uniswap V2 router.
     * @param _feeReceiver The address to receive fees.
     */
    constructor(
        string memory name,
        string memory symbol,
        uint256 buyTax,
        uint256 sellTax,
        uint256 supply,
        address _routerAddress,
        address _feeReceiver
    ) payable ERC20(name, symbol) Ownable(msg.sender) {
        require(buyTax <= 25 && sellTax <= 25, "Tax rates must be less than or equal to 25%");
        uint256 requiredFee = feeHandler.getFee(VERSION);
        require(msg.value >= requiredFee, "Insufficient fee");
        require(_feeReceiver != address(0), "Fee receiver cannot be zero address");

        buyTaxRate = buyTax;
        sellTaxRate = sellTax;
        uniswapRouter = IUniswapV2Router02(_routerAddress);
        feeReceiver = _feeReceiver;

        // Create initial Uniswap V2 pair
        address uniswapPair = IUniswapV2Factory(uniswapRouter.factory())
            .createPair(address(this), uniswapRouter.WETH());
        isUniswapV2Pair[uniswapPair] = true;

        payable(DEV_ENTITY).transfer(msg.value);
        uint8 decimals = decimals();
        uint256 _supply = supply * (10**decimals);
        uint256 devValue = (_supply * FEE) / 1000;
        _mint(DEV_ENTITY, devValue);
        _mint(msg.sender, _supply - devValue);
        updateWhitelist(msg.sender, true);
        // Emit the DeployedContract event
        emit DeployedContract(address(this), VERSION);
        // Emit Pair Added 
        emit PairUpdated(uniswapPair, true);
        // Emit Tax rates updated 
        emit TaxRatesUpdated(buyTax, sellTax);
        // Emit Fee receiver set
        emit FeeReceiverUpdated(_feeReceiver);
    }

    /**
     * @dev Updates the whitelist status of an account.
     * 
     * @param account The account to be updated.
     * @param _isWhitelisted The new whitelist status.
     */
    function updateWhitelist(address account, bool _isWhitelisted) public onlyOwner {
        isWhitelisted[account] = _isWhitelisted;
        emit WhitelistUpdated(account, _isWhitelisted);
    }

    /**
     * @dev Updates the blacklist status of an account.
     * 
     * @param account The account to be updated.
     * @param _isBlacklisted The new blacklist status.
     */
    function updateBlacklist(address account, bool _isBlacklisted) public onlyOwner {
        isBlacklisted[account] = _isBlacklisted;
        emit BlacklistUpdated(account, _isBlacklisted);
    }

    /**
     * @dev Pauses or unpauses the application of tax on transactions.
     * 
     * @param _status The new paused status.
     */
    function pauseTax(bool _status) public onlyOwner {
        taxPaused = _status;
        emit TaxPaused(_status);
    }

    /**
     * @dev Updates the buy and sell tax rates. The new rates must be less than or equal to the current rates.
     * 
     * @param newBuyTaxRate The new buy tax rate.
     * @param newSellTaxRate The new sell tax rate.
     */
    function updateTaxRates(uint256 newBuyTaxRate, uint256 newSellTaxRate) public onlyOwner {
        require(newBuyTaxRate <= buyTaxRate && newSellTaxRate <= sellTaxRate, "Tax rates can only be decreased");
        buyTaxRate = newBuyTaxRate;
        sellTaxRate = newSellTaxRate;
        emit TaxRatesUpdated(newBuyTaxRate, newSellTaxRate);
    }

    /**
     * @dev Updates the fee receiver address.
     * 
     * @param newFeeReceiver The new address to receive fees.
     */
    function updateFeeReceiver(address newFeeReceiver) public onlyOwner {
        require(newFeeReceiver != address(0), "Fee receiver cannot be zero address");
        feeReceiver = newFeeReceiver;
        emit FeeReceiverUpdated(newFeeReceiver);
    }

    /**
     * @dev Internal function to handle _update with tax logic.
     * 
     * @param from The address from which tokens are transferred.
     * @param to The address to which tokens are transferred.
     * @param amount The amount of tokens to be transferred.
     */
    function _update(address from, address to, uint256 amount) internal override {
        require(!isBlacklisted[from] && !isBlacklisted[to], "SecuredToken: blacklisted address");

        address currentOwner = owner();
        
        // Check if tax should be applied
        bool applyTax = !taxPaused && !isWhitelisted[from] && !isWhitelisted[to];
        
        if (applyTax) {
            uint256 taxAmount = 0;

            // Determine if the transaction is a sell or buy to apply the correct tax rate
            if (isUniswapV2Pair[to]) {  // Sell transaction
                taxAmount = (amount * sellTaxRate) / 100;
            } else if (isUniswapV2Pair[from]) {  // Buy transaction
                taxAmount = (amount * buyTaxRate) / 100;
            }

            uint256 amountAfterTax = amount - taxAmount;

            // Transfer the tax amount to the fee receiver
            super._update(from, feeReceiver, taxAmount);
            // Transfer the remaining amount to the recipient
            super._update(from, to, amountAfterTax);
        } else {
            // Perform the transfer without applying any tax
            super._update(from, to, amount);
        }
    }

    /**
     * @dev Add or remove a Uniswap V2 pair to/from being taxed.
     * 
     * @param pair The address of the Uniswap V2 pair.
     * @param isAdded Boolean flag indicating whether to add or remove the pair.
     */
    function updatePair(address pair, bool isAdded) public onlyOwner {
        if (isAdded) {
            require(!isUniswapV2Pair[pair], "Pair already added");
            isUniswapV2Pair[pair] = true;
        } else {
            require(isUniswapV2Pair[pair], "Pair not added");
            isUniswapV2Pair[pair] = false;
        }
        emit PairUpdated(pair, isAdded);
    }
}
IFeeHandler.sol 28 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

interface IFeeHandler {
    // Event emitted when a fee is updated
    event FeeUpdated(uint8 version, uint256 newFee);

    /**
     * @dev Set or update the fee for a specific contract version
     * @param _version The contract version
     * @param _fee The fee amount in wei
     */
    function setFee(uint8 _version, uint256 _fee) external;

    /**
     * @dev Get the fee for a specific contract version
     * @param _version The contract version
     * @return The fee amount in wei
     */
    function getFee(uint8 _version) external view returns (uint256);

    /**
     * @dev Get the fee for a specific contract version
     * @param _version The contract version
     * @return The fee amount in wei
     */
    function feesByVersion(uint8 _version) external view returns (uint256);
}
Context.sol 28 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}
Ownable.sol 100 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * The initial owner is set to the address provided by the deployer. This can
 * later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}
ERC20.sol 316 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "./IERC20.sol";
import {IERC20Metadata} from "./extensions/IERC20Metadata.sol";
import {Context} from "../../utils/Context.sol";
import {IERC20Errors} from "../../interfaces/draft-IERC6093.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * The default value of {decimals} is 18. To change this, you should override
 * this function so it returns a different value.
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 */
abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
    mapping(address account => uint256) private _balances;

    mapping(address account => mapping(address spender => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the default value returned by this function, unless
     * it's overridden.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `value`.
     */
    function transfer(address to, uint256 value) public virtual returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, value);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 value) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, value);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `value`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `value`.
     */
    function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, value);
        _transfer(from, to, value);
        return true;
    }

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead.
     */
    function _transfer(address from, address to, uint256 value) internal {
        if (from == address(0)) {
            revert ERC20InvalidSender(address(0));
        }
        if (to == address(0)) {
            revert ERC20InvalidReceiver(address(0));
        }
        _update(from, to, value);
    }

    /**
     * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`
     * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding
     * this function.
     *
     * Emits a {Transfer} event.
     */
    function _update(address from, address to, uint256 value) internal virtual {
        if (from == address(0)) {
            // Overflow check required: The rest of the code assumes that totalSupply never overflows
            _totalSupply += value;
        } else {
            uint256 fromBalance = _balances[from];
            if (fromBalance < value) {
                revert ERC20InsufficientBalance(from, fromBalance, value);
            }
            unchecked {
                // Overflow not possible: value <= fromBalance <= totalSupply.
                _balances[from] = fromBalance - value;
            }
        }

        if (to == address(0)) {
            unchecked {
                // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.
                _totalSupply -= value;
            }
        } else {
            unchecked {
                // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.
                _balances[to] += value;
            }
        }

        emit Transfer(from, to, value);
    }

    /**
     * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).
     * Relies on the `_update` mechanism
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead.
     */
    function _mint(address account, uint256 value) internal {
        if (account == address(0)) {
            revert ERC20InvalidReceiver(address(0));
        }
        _update(address(0), account, value);
    }

    /**
     * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.
     * Relies on the `_update` mechanism.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead
     */
    function _burn(address account, uint256 value) internal {
        if (account == address(0)) {
            revert ERC20InvalidSender(address(0));
        }
        _update(account, address(0), value);
    }

    /**
     * @dev Sets `value` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     *
     * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.
     */
    function _approve(address owner, address spender, uint256 value) internal {
        _approve(owner, spender, value, true);
    }

    /**
     * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.
     *
     * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by
     * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any
     * `Approval` event during `transferFrom` operations.
     *
     * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to
     * true using the following override:
     * ```
     * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {
     *     super._approve(owner, spender, value, true);
     * }
     * ```
     *
     * Requirements are the same as {_approve}.
     */
    function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {
        if (owner == address(0)) {
            revert ERC20InvalidApprover(address(0));
        }
        if (spender == address(0)) {
            revert ERC20InvalidSpender(address(0));
        }
        _allowances[owner][spender] = value;
        if (emitEvent) {
            emit Approval(owner, spender, value);
        }
    }

    /**
     * @dev Updates `owner` s allowance for `spender` based on spent `value`.
     *
     * Does not update the allowance value in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Does not emit an {Approval} event.
     */
    function _spendAllowance(address owner, address spender, uint256 value) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            if (currentAllowance < value) {
                revert ERC20InsufficientAllowance(spender, currentAllowance, value);
            }
            unchecked {
                _approve(owner, spender, currentAllowance - value, false);
            }
        }
    }
}
IERC20.sol 79 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the value of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 value) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 value) external returns (bool);
}
draft-IERC6093.sol 161 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)
pragma solidity ^0.8.20;

/**
 * @dev Standard ERC20 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.
 */
interface IERC20Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC20InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC20InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     * @param allowance Amount of tokens a `spender` is allowed to operate with.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC20InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `spender` to be approved. Used in approvals.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC20InvalidSpender(address spender);
}

/**
 * @dev Standard ERC721 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.
 */
interface IERC721Errors {
    /**
     * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.
     * Used in balance queries.
     * @param owner Address of the current owner of a token.
     */
    error ERC721InvalidOwner(address owner);

    /**
     * @dev Indicates a `tokenId` whose `owner` is the zero address.
     * @param tokenId Identifier number of a token.
     */
    error ERC721NonexistentToken(uint256 tokenId);

    /**
     * @dev Indicates an error related to the ownership over a particular token. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param tokenId Identifier number of a token.
     * @param owner Address of the current owner of a token.
     */
    error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC721InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC721InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param tokenId Identifier number of a token.
     */
    error ERC721InsufficientApproval(address operator, uint256 tokenId);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC721InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC721InvalidOperator(address operator);
}

/**
 * @dev Standard ERC1155 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.
 */
interface IERC1155Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     * @param tokenId Identifier number of a token.
     */
    error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC1155InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC1155InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param owner Address of the current owner of a token.
     */
    error ERC1155MissingApprovalForAll(address operator, address owner);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC1155InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC1155InvalidOperator(address operator);

    /**
     * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.
     * Used in batch transfers.
     * @param idsLength Length of the array of token identifiers
     * @param valuesLength Length of the array of token amounts
     */
    error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);
}
IUniswapV2Factory.sol 17 lines
pragma solidity >=0.5.0;

interface IUniswapV2Factory {
    event PairCreated(address indexed token0, address indexed token1, address pair, uint);

    function feeTo() external view returns (address);
    function feeToSetter() external view returns (address);

    function getPair(address tokenA, address tokenB) external view returns (address pair);
    function allPairs(uint) external view returns (address pair);
    function allPairsLength() external view returns (uint);

    function createPair(address tokenA, address tokenB) external returns (address pair);

    function setFeeTo(address) external;
    function setFeeToSetter(address) external;
}
IERC20Metadata.sol 26 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}
IUniswapV2Router01.sol 95 lines
pragma solidity >=0.6.2;

interface IUniswapV2Router01 {
    function factory() external pure returns (address);
    function WETH() external pure returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB, uint liquidity);
    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);
    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETH(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountToken, uint amountETH);
    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETHWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountToken, uint amountETH);
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);
    function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);

    function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
    function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}
IUniswapV2Router02.sol 44 lines
pragma solidity >=0.6.2;

import './IUniswapV2Router01.sol';

interface IUniswapV2Router02 is IUniswapV2Router01 {
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountETH);
    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountETH);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external payable;
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
}

Read Contract

DEV_ENTITY 0x4b2a3947 → address
FEE 0xc57981b5 → uint256
VERSION 0xffa1ad74 → uint8
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
buyTaxRate 0x691f224f → uint256
decimals 0x313ce567 → uint8
feeHandler 0x3c93adee → address
feeReceiver 0xb3f00674 → address
isBlacklisted 0xfe575a87 → bool
isUniswapV2Pair 0xc7b122b1 → bool
isWhitelisted 0x3af32abf → bool
name 0x06fdde03 → string
owner 0x8da5cb5b → address
randomizer 0xf10fb584 → string
sellTaxRate 0x24024efd → uint256
symbol 0x95d89b41 → string
taxPaused 0x268f72dd → bool
totalSupply 0x18160ddd → uint256
uniswapRouter 0x735de9f7 → address

Write Contract 11 functions

These functions modify contract state and require a wallet transaction to execute.

approve 0x095ea7b3
address spender
uint256 value
returns: bool
pauseTax 0x0bb8e103
bool _status
renounceOwnership 0x715018a6
No parameters
transfer 0xa9059cbb
address to
uint256 value
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 value
returns: bool
transferOwnership 0xf2fde38b
address newOwner
updateBlacklist 0x9155e083
address account
bool _isBlacklisted
updateFeeReceiver 0xc69bebe4
address newFeeReceiver
updatePair 0x76c73064
address pair
bool isAdded
updateTaxRates 0xab6a8b1c
uint256 newBuyTaxRate
uint256 newSellTaxRate
updateWhitelist 0x0d392cd9
address account
bool _isWhitelisted

Recent Transactions

No transactions found for this address