Skip to main content

recordAddedBalanceFor

Contract: JBSingleTokenPaymentTerminalStore​‌

Interface: IJBSingleTokenPaymentTerminalStore

Records newly added funds for the project.

The msg.sender must be an IJBSingleTokenPaymentTerminal.

Definition

function recordAddedBalanceFor(uint256 _projectId, uint256 _amount) external override { ... }
  • Arguments:
    • _projectId is the ID of the project to which the funds being added belong.
    • _amount is the amount of terminal tokens added, as a fixed point number with the same amount of decimals as its relative terminal.
  • The resulting function overrides a function definition from the JBSingleTokenPaymentTerminalStore interface.
  • The function doesn't return anything.

Body

  1. Increment the project's balance by the specified amount.

    // Increment the balance.
    balanceOf[IJBSingleTokenPaymentTerminal(msg.sender)][_projectId] =
    balanceOf[IJBSingleTokenPaymentTerminal(msg.sender)][_projectId] +
    _amount;

    Internal references: