issueTokenFor
Contract: JBController
Interface: IJBController
- Step by step
- Code
- Bug bounty
Issues an owner's ERC20 JBTokens that'll be used when claiming tokens.
Deploys a project's ERC20 JBToken contract.
Only a project's owner or operator can issue its token.
Definition
function issueFor(
uint256 _projectId,
string calldata _name,
string calldata _symbol
)
external
virtual
override
requirePermission(projects.ownerOf(_projectId), _projectId, JBOperations.ISSUE)
returns (IJBToken token) { ... }
- Arguments:
_projectId
is the ID of the project being issued tokens._name
is the ERC20's name._symbol
is the ERC20's symbol.
- Through the
requirePermission
modifier, the function is only accessible by the project's owner, or from an operator that has been given theJBOperations.ISSUE
permission by the project owner for the provided_projectId
. - The function can be overriden by inheriting contracts.
- The function overrides a function definition from the
IJBController
interface. - The function returns the address of the token that was issued.
Body
-
Forward the call to the token store.
// Issue the token in the store.
return tokenStore.issueFor(_projectId, _name, _symbol);Internal references:
External references:
/**
@notice
Issues an owner's ERC20 JBTokens that'll be used when claiming tokens.
@dev
Deploys a project's ERC20 JBToken contract.
@dev
Only a project's owner or operator can issue its token.
@param _projectId The ID of the project being issued tokens.
@param _name The ERC20's name.
@param _symbol The ERC20's symbol.
*/
function issueTokenFor(
uint256 _projectId,
string calldata _name,
string calldata _symbol
)
external
virtual
override
requirePermission(projects.ownerOf(_projectId), _projectId, JBOperations.ISSUE)
returns (IJBToken token)
{
// Issue the token in the store.
return tokenStore.issueFor(_projectId, _name, _symbol);
}
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 |