Skip to content
Lattice

IERC20Capped

Git Source

Title: IERC20Capped

Author: Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/extensions/ERC20Capped.sol)

Interface for ERC-20 tokens with a capped total supply.

Functions

cap

Returns the cap on the token's total supply.

function cap() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256

Errors

ERC20ExceededCap

Thrown when a mint would cause the total supply to exceed the cap.

error ERC20ExceededCap(uint256 increasedSupply, uint256 cap);

Parameters

NameTypeDescription
increasedSupplyuint256
capuint256

ERC20InvalidCap

Thrown when the cap is set to zero.

error ERC20InvalidCap(uint256 cap);

Parameters

NameTypeDescription
capuint256