Quantillon Protocol

Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

MockUSDC

Git Source

Inherits: ERC20, Ownable

This is a simplified ERC20 token that mimics USDC behavior

Mock USDC token for testing and development

State Variables

_DECIMALS

uint8 private constant _DECIMALS = 6

Functions

constructor

constructor() ERC20("USD Coin", "USDC") Ownable(msg.sender);

decimals

Returns the number of decimals used to get its user representation.

function decimals() public pure override returns (uint8);

mint

Mint tokens to a specific address (for testing)

function mint(address to, uint256 amount) external onlyOwner;

Parameters

NameTypeDescription
toaddressThe address to mint tokens to
amountuint256The amount of tokens to mint

faucet

Faucet function for easy testing - anyone can call this

function faucet(uint256 amount) external;

Parameters

NameTypeDescription
amountuint256The amount of tokens to mint to caller