Skip to content

CCIP CCT -> BURNMINTERC20 -> mint() function Issue. #18176

Open
@yazibshah

Description

@yazibshah

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions