Loading...
The Max Supply Cap sets a hard, immutable upper limit on the total number of tokens that can ever exist. Once set at deployment, this cap cannot be changed — even the contract owner cannot mint tokens beyond it. This provides the strongest possible scarcity guarantee for your token.
The max supply cap is enforced by overriding the internal `_mint()` function with a check: `require(totalSupply() + amount <= maxSupply)`. If any mint operation would exceed the cap, the transaction reverts. The cap is set in the constructor and stored as an immutable variable.
uint256 public immutable maxSupply;
constructor(uint256 _maxSupply) {
maxSupply = _maxSupply;
}
function _mint(address to, uint256 amount) internal override {
require(totalSupply() + amount <= maxSupply, "Exceeds max supply");
super._mint(to, amount);
}Create a token with a Bitcoin-like hard cap that guarantees scarcity over time.
Prove to investors and holders that supply inflation is mathematically impossible beyond a set limit.
Combine with Mintable to allow flexible minting up to a hard ceiling — the best of both worlds.
Combine with Burnable to create a supply that can only decrease from the cap, never increase beyond it.
Deploy a secure, verified smart contract with the Max Supply Cap feature on Ethereum in minutes. No coding required.
Create a Max Supply Cap Token