MockUSDC
Inherits: ERC20
Title: MockUSDC
Author: Obiaraije Henry
Minimal 6-decimal ERC20 token standing in for USDC on a local network.
Used by the deploy script; the platform only touches it through {IERC20}. It exposes an unrestricted mint faucet so local balances can be funded; never use it outside a test network.
Functions
constructor
Deploys the mock token with the USDC name and symbol.
constructor() ERC20("USD Coin", "USDC");
mint
Mints amount tokens to to.
Deliberately unrestricted: this is a local test faucet with no access control, so any address can be funded. Do not deploy on a real network.
function mint(address to, uint256 amount) external;
Parameters
| Name | Type | Description |
|---|---|---|
to | address | The address receiving the newly minted tokens. |
amount | uint256 | The amount to mint, in token units (6 decimals). |
decimals
USDC uses 6 decimals rather than the ERC20 default of 18.
function decimals() public pure override returns (uint8);
Returns
| Name | Type | Description |
|---|---|---|
<none> | uint8 | The number of decimals, 6. |