Skip to main content


Contract: JBController​‌

Interface: IJBController

The amount of overflow that a project is allowed to tap into on-demand throughout a configuration, and the currency it's in terms of.

The number of decimals in the returned fixed point amount is the same as that of the specified terminal.


function overflowAllowanceOf(
uint256 _projectId,
uint256 _configuration,
IJBPaymentTerminal _terminal,
address _token
) external view override returns (uint256, uint256) { ... }
  • Arguments:
  • _projectId is the ID of the project to get the overflow allowance of.
  • _configuration is the configuration of the during which the allowance applies.
  • _terminal is the IJBPaymentTerminal managing the overflow.
  • _token is the token for which the overflow allowance applies.
  • The view function can be accessed externally by anyone.
  • The view function does not alter state on the blockchain.
  • The function overrides a function definition from the IJBController interface.
  • The function returns:
    • overflowAllowance is the overflow allowance, as a fixed point number with the same number of decimals as the provided terminal.
    • overflowAllowanceCurrency is the currency from JBCurrencies that the returned overflow allowance is in terms of.


  1. Get a reference to the packed overflow allowance data.

    // Get a reference to the packed data.
    uint256 _data = _packedOverflowAllowanceDataOf[_projectId][_configuration][_terminal];

    Internal references:

  2. Return the overflow allowance, which is in the first 248 bits, and the currency the overflow allowance is in terms of, which is in the last 8 bits.

    // The allowance is in bits 0-231. The currency is in bits 232-255.
    return (uint256(uint232(_data)), _data >> 232);