Skip to main content

_transferFrom

Contract: JBPayoutRedemptionPaymentTerminal​‌

Transfers tokens.

Definition

function _transferFrom(
address _from,
address payable _to,
uint256 _amount
) internal override { ...}
  • Arguments:
    • _from is the address from which the transfer should originate.
    • _to is the address to which the transfer should go.
    • _amount is the amount of the transfer, as a fixed point number with the same number of decimals as this terminal.
  • The resulting function is internal to this contract and its inheriters.
  • The resulting function overrides a function definition from the IJBPayoutRedemptionPaymentTerminal interface.

Body

  1. Send the ERC20. If the specified sender is this contract, use the transfer transaction that doesn't require pre-approval. Otherwise, transfer from the specified address.

     _from == address(this)
    ? IERC20(token).safeTransfer(_to, _amount)
    : IERC20(token).safeTransferFrom(_from, _to, _amount);

    External references: