跳到主要内容

transferFrom

Contract: JBToken​‌

Interface: IJBToken

Transfer tokens to an account.

Definition

function transfer(
uint256 _projectId,
address _to,
uint256 _amount
) external override { ... }
  • Arguments:
    • _projectId is the ID of the project to which the token belongs. This is ignored.
    • _to is the destination address.
    • _amount is the amount of the transfer, as a fixed point number with 18 decimals.
  • The function overrides a function definition from the IJBToken interface.
  • The function doesn't return anything.

Body

  1. 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:

  2. Forward the call to the ERC20 implementation.

    transfer(_to, _amount);

    Inherited references: