Skip to main content

acceptsToken

Contract: JBSingleTokenPaymentTerminal​‌

Interface: IJBPaymentTerminal

A flag indicating if this terminal accepts the specified token.

Definition

function acceptsToken(address _token, uint256 _projectId) external view override returns (bool) { ... }
  • Arguments:
    • _token is the token to check if this terminal accepts or not.
    • _projectId is the project ID to check for token acceptance.
  • The view function can be accessed externally by anyone.
  • The view function does not alter state on the blockchain.
  • The resulting function overrides a function definition from the IJBPaymentTerminal interface.
  • The function returns the flag.

Body

  1. In order for this terminal to accept a token, it must match the single token that this terminal is for.

    return _token == token;