Open
Description
function mint(address account, uint256 amount) external override onlyRole(MINTER_ROLE) {
if (account == address(this)) revert InvalidRecipient(account);
if (i_maxSupply != 0 && totalSupply() + amount > i_maxSupply) revert MaxSupplyExceeded(totalSupply() + amount);
_mint(account, amount);
}
When attempting to override the mint function in a CCT WETH smart contract to enable automatic WETH minting upon ETH deposit, the current implementation restricts direct minting to user accounts. This prevents seamless ETH-to-WETH conversion. Need guidance on safely overriding the function to support this functionality while maintaining security and compliance with the MINTER_ROLE and max supply checks.
Metadata
Metadata
Assignees
Labels
No labels