transferFrom
Contract: JBToken
Interface: IJBToken
- Step by step
 - Code
 - Errors
 - Bug bounty
 
Transfer tokens to an account.
Definition
function transfer(
  uint256 _projectId,
  address _to,
  uint256 _amount
) external override { ... }
- Arguments:
_projectIdis the ID of the project to which the token belongs. This is ignored._tois the destination address._amountis the amount of the transfer, as a fixed point number with 18 decimals.
 - 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 transfer for a wrong project.
if (projectId != 0 && _projectId != projectId) revert BAD_PROJECT();Internal references:
 - 
Forward the call to the ERC20 implementation.
transfer(_to, _amount);Inherited references:
 
/**
  @notice
  Transfer tokens to an account.
  @param _projectId The ID of the project to which the token belongs. This is ignored.
  @param _to The destination address.
  @param _amount The amount of the transfer, as a fixed point number with 18 decimals.
*/
function transfer(
  uint256 _projectId,
  address _to,
  uint256 _amount
) external override {
  // Can't transfer for a wrong project.
  if (projectId != 0 && _projectId != projectId) revert BAD_PROJECT();
  transfer(_to, _amount);
}
| String | Description | 
|---|---|
BAD_PROJECT | Thrown if the project being transfered 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 |