// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;

contract CartmanInu {
    address public owner;
    uint256 public totalSupply;
    uint256 public maxSupply = 4_000_000_000 * 10**18; // 4 billion tokens with 18 decimal places

    mapping(address => uint256) balances;

    modifier onlyOwner() {
        require(msg.sender == owner, "Only the owner can call this function");
        _;
    }

    event Transfer(address indexed from, address indexed to, uint256 value);

    constructor() {
        owner = msg.sender;
        totalSupply = maxSupply;
        balances[owner] = maxSupply;
        emit Transfer(address(0), owner, maxSupply);
    }

    function mint(address account, uint256 amount) external onlyOwner {
        require(totalSupply + amount <= maxSupply, "Exceeds maximum supply");
        balances[account] += amount;
        totalSupply += amount;
        emit Transfer(address(0), account, amount);
    }

    function balanceOf(address account) external view returns (uint256) {
        return balances[account];
    }

    function transfer(address to, uint256 value) external {
        require(value <= balances[msg.sender], "Insufficient balance");
        balances[msg.sender] -= value;
        balances[to] += value;
        emit Transfer(msg.sender, to, value);
    }
}