fn _mint(&mut self, account: AccountId, amount: Balance) -> Result<(), PSP22Error> {
            if (self.total_supply() + amount) > self.cap() {
                return Err(PSP22Error::Custom(String::from("Cap exceeded")))
            }
            PSP22Internal::_mint(self, account, amount)
        }
/// Overrides the `_mint` function to check for cap overflow before minting tokens
/// Performs `PSP22::_mint` after the check succeeds
Overrides the `_mint` function to check for cap overflow before minting tokens
Performs `PSP22::_mint` after the check succeeds
Overrides the ` _mint ` function to check for cap overflow before minting tokens Performs ` PSP22 :: _mint ` after the check succeeds
fn _mint(&mut self, account: AccountId, amount: Balance) -> Result<(), PSP22Error> {
            if (self.total_supply() + amount) > self.cap() {
                return Err(PSP22Error::Custom(String::from("Cap exceeded")))
            }
            PSP22Internal::_mint(self, account, amount)
        }
fn _mint ( & mut self , account : AccountId , amount : Balance ) -> Result < ( ) , PSP22Error > { if ( self . total_supply ( ) + amount ) > self . cap ( ) { return Err ( PSP22Error :: Custom ( String :: from ( " " ) ) ) } PSP22Internal :: _mint ( self , account , amount ) }
Overrides the `_mint` function to check for cap overflow before minting tokens
Performs `PSP22::_mint` after the check succeeds
Overrides the ` _mint ` function to check for cap overflow before minting tokens Performs ` PSP22 :: _mint ` after the check succeeds
&mut self
account
AccountId
amount
Balance
&mut self
account
AccountId
amount
Balance