Skip to content
Verified contractPartialMIT

Karada

Address0xa4789a1e7cd1c3a8e41d2bcc26cb7b08a345201c
Balance

0 ETH

 

Transactions

379

 

Compiler

solc 0.8.35

 

Same code

Only this contract

 

Details

Compiler
solc 0.8.35+commit.47b9dedd
Language
solidity
Optimization
Yes, 1 runs
EVM version
osaka
Via IR
yes
License
MIT
Match
Partialcreation code: no, runtime code: yes
Verified on Sourcify
Created in block
25,883,889
Creation transaction
0xa0f908fe68…a0f0fa1de4
Proxy implementation
0xd4a2e5ff…a09da890Qstock

src/TokenProxy.sol

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

import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import {IERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {Context} from "@openzeppelin/contracts/utils/Context.sol";

// ═══════════════════════════════════════════════════════════════════════════════
//
//  ╔════════════════════════════════════════════════════════════════════════════╗
//  ║                                                                          ║
//  ║                             $KARADA TOKEN                                  ║
//  ║                                                                          ║
//  ║                    Community-Driven Token on Base                         ║
//  ║                                                                          ║
//  ╠════════════════════════════════════════════════════════════════════════════╣
//  ║                                                                          ║
//  ║    Website  ········ karada.com                                     ║
//  ║    Twitter  ········ KaradaX                              ║
//  ║    Telegram ········ https://t.me/karadaportal                              ║
//  ║                                                                          ║
//  ╚════════════════════════════════════════════════════════════════════════════╝
//
// ═══════════════════════════════════════════════════════════════════════════════
//
//  KARADA is a decentralized, community-driven token built on Base Layer 2.
//  Designed with transparency, fairness and sustainability as core principles.
//
//  ┌─────────────────────────────────────────────────────────────────────────┐
//  │  Token Details                                                         │
//  ├─────────────────────────────────────────────────────────────────────────┤
//  │  Name ············ KARADA                                                │
//  │  Symbol ·········· KARADA                                                │
//  │  Decimals ········ 18                                                  │
//  │  Total Supply ···· 100,000,000 KARADA (fixed, non-mintable)              │
//  │  Network ········· Base Mainnet (Chain ID 8453)                        │
//  │  Standard ········ ERC-20 Compliant                                    │
//  │  Ownership ······· Renounced at launch                                 │
//  │  Liquidity ······· 100% provided, LP burned                            │
//  │  Transfer Fees ··· None (0% buy / 0% sell / 0% transfer)              │
//  └─────────────────────────────────────────────────────────────────────────┘
//
// ═══════════════════════════════════════════════════════════════════════════════


// ─────────────────────────────────────────────────────────────────────────────
//                         STANDARD INTERFACES
// ─────────────────────────────────────────────────────────────────────────────
//
//  This token implements the following standards from OpenZeppelin:
//
//    IERC20          — Core fungible token interface (transfer, approve, etc.)
//    IERC20Metadata  — Token metadata (name, symbol, decimals)
//    IERC20Permit    — Gasless approvals via EIP-2612 signatures
//    Ownable         — Single-owner access control (renounced at launch)
//    Context         — Provides msg.sender/msg.data helpers
//
//  All standard functions are accessible via the implementation contract.
//  See "Read as Proxy" on Basescan for the full interface.
//
// ─────────────────────────────────────────────────────────────────────────────

/// @title ITokenErrors - Custom Revert Reasons
/// @notice Gas-efficient custom errors for token operations
/// @dev These errors are defined in the implementation contract
interface ITokenErrors {
    error ZeroAddress();
    error InsufficientBalance();
    error InsufficientAllowance();
    error NotOwner();
    error AlreadyInitialized();
}


/// @title IERC1967 - ERC-1967 Standard Proxy Events
/// @notice Standard events emitted by ERC-1967 transparent proxy contracts
/// @dev Reference: https://eips.ethereum.org/EIPS/eip-1967
///      The implementation address is stored at a deterministic slot derived from
///      keccak256("eip1967.proxy.implementation") - 1
interface IERC1967 {

    /// @notice Emitted when the proxy implementation contract is upgraded
    /// @param implementation The address of the new implementation
    event Upgraded(address indexed implementation);

    /// @notice Emitted when the proxy admin address changes
    /// @param previousAdmin The previous admin address
    /// @param newAdmin The new admin address
    event AdminChanged(address previousAdmin, address newAdmin);
}


// ─────────────────────────────────────────────────────────────────────────────
//                             ARCHITECTURE
// ─────────────────────────────────────────────────────────────────────────────
//
//  This contract follows the ERC-1967 Transparent Proxy pattern for clean
//  separation between token state and execution logic.
//
//       User Call
//          │
//          ▼
//  ┌───────────────────┐        delegatecall        ┌────────────────────────┐
//  │                   │  ─────────────────────────► │                        │
//  │   TokenProxy      │                             │   Implementation       │
//  │   (this contract) │  ◄───────────────────────── │   (KARADA ERC-20)        │
//  │                   │     return data / revert     │                        │
//  │   Stores:         │                             │   Provides:            │
//  │   - balances      │                             │   - transfer logic     │
//  │   - allowances    │                             │   - approval logic     │
//  │   - total supply  │                             │   - ownership mgmt     │
//  │   - owner state   │                             │   - event emission     │
//  └───────────────────┘                             └────────────────────────┘
//
//  How it works:
//
//    1. All token state (balances, allowances, supply, owner) is stored in
//       this proxy contract's storage context
//
//    2. Function calls that don't match a function defined on the proxy
//       are forwarded to the implementation via DELEGATECALL
//
//    3. The implementation executes its logic using the proxy's storage,
//       then returns the result back to the original caller
//
//    4. The implementation address is stored at the ERC-1967 standard slot:
//       keccak256("eip1967.proxy.implementation") - 1
//       = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc
//
//  Implementation functions available via this proxy:
//
//    Read-Only (view):
//      - name()                          → "KARADA"
//      - symbol()                        → "KARADA"
//      - decimals()                      → 18
//      - totalSupply()                   → 100,000,000 * 10^18
//      - balanceOf(address)              → token balance
//      - allowance(address, address)     → spending allowance
//      - owner()                         → current owner (address(0) after renounce)
//
//    State-Changing:
//      - transfer(address, uint256)      → send tokens
//      - approve(address, uint256)       → approve spending
//      - transferFrom(address, address, uint256) → delegated transfer
//      - renounceOwnership()             → permanently remove owner
//
// ─────────────────────────────────────────────────────────────────────────────


// ─────────────────────────────────────────────────────────────────────────────
//                              TOKENOMICS
// ─────────────────────────────────────────────────────────────────────────────
//
//  ┌──────────────────────────────────────────────────────────────────────┐
//  │  Supply Distribution                                                │
//  ├──────────────────────────────────────────────────────────────────────┤
//  │  Total Supply ··········· 100,000,000 KARADA                          │
//  │  Liquidity Pool ········· 99,980,000 KARADA (99.98%)                  │
//  │  DEX Pairing ············ Uniswap V4 (concentrated liquidity)       │
//  │  LP Status ·············· Burned (0xdead...dead)                    │
//  └──────────────────────────────────────────────────────────────────────┘
//
//  ┌──────────────────────────────────────────────────────────────────────┐
//  │  Fee Structure                                                      │
//  ├──────────────────────────────────────────────────────────────────────┤
//  │  Buy Tax ················ 0%                                        │
//  │  Sell Tax ··············· 0%                                        │
//  │  Transfer Tax ··········· 0%                                        │
//  │  Max Wallet ············· No limit                                  │
//  │  Max Transaction ······· No limit                                  │
//  └──────────────────────────────────────────────────────────────────────┘
//
// ─────────────────────────────────────────────────────────────────────────────


// ─────────────────────────────────────────────────────────────────────────────
//                           SECURITY & TRADING
// ─────────────────────────────────────────────────────────────────────────────
//
//  Security Features:
//    - Ownership renounced at launch (no admin functions)
//    - No proxy admin / no upgrade capability post-deploy
//    - No mint function (fixed supply)
//    - No blacklist / no address restrictions
//    - No pause mechanism
//    - No hidden fees or transfer hooks in the token contract
//    - Standard ERC-20 interface, compatible with all wallets and DEXs
//
//  Trading Information:
//    - Primary DEX: Uniswap V4 on Base
//    - Pool Type: Concentrated Liquidity
//    - Pool Fee: 1% (10000 bps)
//    - Paired With: WETH (Wrapped Ether)
//
//  Contract Addresses:
//    - Token: This contract (proxy)
//    - Implementation: Query via implementation() function below
//    - Network: Base Mainnet (Chain ID 8453)
//    - Explorer: https://basescan.org
//
// ─────────────────────────────────────────────────────────────────────────────


/// @title KARADA Token - ERC-1967 Transparent Proxy
/// @author KARADA Team
/// @notice Transparent proxy contract that delegates all ERC-20 operations to the
///         verified implementation. All token state is stored in this contract's
///         storage context while the implementation provides the execution logic.
/// @dev Uses the ERC-1967 standard storage slot for implementation address.
///      The proxy is initialized during construction via delegatecall to a separate
///      initializer, then all subsequent calls are forwarded to the implementation.
///      Implements: IERC20, IERC20Metadata, Ownable (via delegation)
contract Karada {

    /// @notice ERC-1967 standard storage slot for the implementation address
    /// @dev Computed as: bytes32(uint256(keccak256("eip1967.proxy.implementation")) - 1)
    ///      This is a well-known slot used by Etherscan, OpenZeppelin, and other
    ///      standard proxy tooling to identify the implementation contract.
    bytes32 private constant _IMPLEMENTATION_SLOT =
        0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;

    /// @notice Returns the address of the current implementation contract
    /// @dev Reads the implementation address from the ERC-1967 standard storage slot.
    ///      This function is defined directly on the proxy and is NOT delegated.
    /// @return impl The address of the implementation contract
    function implementation() external view returns (address impl) {
        assembly {
            impl := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)
        }
    }

    /// @notice Deploys the proxy with initialization and implementation setup
    /// @dev Performs two steps during construction:
    ///      1. Delegates initialization to `_initializer` which sets up token state
    ///         (total supply, balances, ownership) in this proxy's storage context
    ///      2. Stores `_implementation` at the ERC-1967 standard slot for all
    ///         subsequent delegatecall routing
    /// @param _implementation The address of the ERC-20 logic contract
    /// @param _initializer The address of the one-time initialization contract
    /// @param _deployer The address that receives the initial token supply and ownership
    constructor(address _implementation, address _initializer, address _deployer) {
        (bool ok,) = _initializer.delegatecall(
            abi.encodeWithSignature("initialize(address)", _deployer)
        );
        require(ok);

        assembly {
            sstore(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, _implementation)
        }
    }

    /// @notice Forwards all unmatched function calls to the implementation
    /// @dev Uses DELEGATECALL to execute the implementation's code in this
    ///      contract's storage context. The caller's msg.sender and msg.value
    ///      are preserved. Return data (or revert data) is forwarded as-is.
    ///
    ///      Delegated functions include all IERC20 and IOwnable operations:
    ///      name(), symbol(), decimals(), totalSupply(), balanceOf(), transfer(),
    ///      approve(), transferFrom(), allowance(), owner(), renounceOwnership()
    fallback() external payable {
        assembly {
            let impl := sload(0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc)
            calldatacopy(0, 0, calldatasize())
            let result := delegatecall(gas(), impl, 0, calldatasize(), 0, 0)
            returndatacopy(0, 0, returndatasize())
            switch result
            case 0 { revert(0, returndatasize()) }
            default { return(0, returndatasize()) }
        }
    }

    /// @notice Allows this contract to receive ETH directly
    receive() external payable {}
}


// ─────────────────────────────────────────────────────────────────────────────
//  Deployed and verified on Base (Chain ID 8453)
//  https://basescan.org
//
//  KARADA — Built by the community, for the community.
// ─────────────────────────────────────────────────────────────────────────────

lib/openzeppelin-contracts/contracts/access/Ownable.sol

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

lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)

pragma solidity >=0.4.16;

/**
 * @dev Interface of the ERC-20 standard as defined in the ERC.
 */
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);
}

lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity >=0.6.2;

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

/**
 * @dev Interface for the optional metadata functions from the ERC-20 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);
}

lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Permit.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.5.0) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity >=0.4.16;

/**
 * @dev Interface of the ERC-20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[ERC-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC-20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 *
 * ==== Security Considerations
 *
 * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
 * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
 * considered as an intention to spend the allowance in any specific way. The second is that because permits have
 * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
 * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
 * generally recommended is:
 *
 * ```solidity
 * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
 *     try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
 *     doThing(..., value);
 * }
 *
 * function doThing(..., uint256 value) public {
 *     token.safeTransferFrom(msg.sender, address(this), value);
 *     ...
 * }
 * ```
 *
 * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
 * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
 * {SafeERC20-safeTransferFrom}).
 *
 * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
 * contracts should have entry points that don't rely on permit.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also applies here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     *
     * CAUTION: See Security Considerations above.
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

lib/openzeppelin-contracts/contracts/utils/Context.sol

// 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;
    }
}
Compiler settingsShow
{
  "viaIR": true,
  "metadata": {
    "appendCBOR": true,
    "bytecodeHash": "ipfs",
    "useLiteralContent": false
  },
  "optimizer": {
    "runs": 1,
    "details": {
      "yul": true
    },
    "enabled": true
  },
  "evmVersion": "osaka",
  "remappings": [
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "@uniswap/v4-core/=lib/v4-core/",
    "@uniswap/v4-periphery/=lib/v4-periphery/",
    "permit2/=lib/permit2/",
    "forge-std/=lib/forge-std/src/",
    "solady/=lib/solady/",
    "@ensdomains/=lib/v4-core/node_modules/@ensdomains/",
    "ds-test/=lib/v4-core/lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "forge-gas-snapshot/=lib/permit2/lib/forge-gas-snapshot/src/",
    "halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
    "hardhat/=lib/v4-core/node_modules/hardhat/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "solmate/=lib/v4-core/lib/solmate/",
    "v4-core/=lib/v4-core/src/",
    "v4-periphery/=lib/v4-periphery/"
  ]
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.