mint
Contract: JBToken
Interface: IJBToken
- Step by step
 - Code
 - Errors
 - Bug bounty
 
Mints more of the token.
Only the owner of this contract cant mint more of it.
Definition
function mint(
  uint256 _projectId,
  address _account,
  uint256 _amount
) external override onlyOwner { ... }
- Arguments:
_projectIdis the ID of the project to which the token belongs. This is ignored._accountis the account to mint the tokens for._amountis the amount of tokens to mint, as a fixed point number with 18 decimals.
 - Through the 
onlyOwnermodifier, this function can only be accessed by the address that owns this contract. - The function overrides a function definition from the 
IJBTokeninterface. - The function doesn't return anything.
 
Body
- 
Make sure the project IDs match, or this contract's project ID is 0.
// Can't mint for a wrong project.
if (projectId != 0 && _projectId != projectId) revert BAD_PROJECT();Internal references:
 - 
Forward the call to the ERC20 implementation.
return _mint(_account, _amount);Inherited references:
 
/**
  @notice
  Mints more of the token.
  @dev
  Only the owner of this contract cant mint more of it.
  @param _projectId The ID of the project to which the token belongs. This is ignored.
  @param _account The account to mint the tokens for.
  @param _amount The amount of tokens to mint, as a fixed point number with 18 decimals.
*/
function mint(
  uint256 _projectId,
  address _account,
  uint256 _amount
) external override onlyOwner {
  // Can't mint for a wrong project.
  if (projectId != 0 && _projectId != projectId) revert BAD_PROJECT();
  return _mint(_account, _amount);
}
| String | Description | 
|---|---|
BAD_PROJECT | Thrown if the project being minted for is not compatible with this contract. | 
| Category | Description | Reward | 
|---|---|---|
| Optimization | Help make this operation more efficient. | 0.5ETH | 
| Low severity | Identify a vulnerability in this operation that could lead to an inconvenience for a user of the protocol or for a protocol developer. | 1ETH | 
| High severity | Identify a vulnerability in this operation that could lead to data corruption or loss of funds. | 5+ETH |