跳到主要内容

JBSingleTokenPaymentTerminalStore

Manages all bookkeeping for inflows and outflows of funds from any IJBSingleTokenPaymentTerminal.

Code

https://github.com/jbx-protocol/juice-contracts-v3/blob/main/contracts/JBSingleTokenPaymentTerminalStore.sol

Addresses

Ethereum mainnet: 0xdF7Ca703225c5da79A86E08E03A206c267B7470C

Goerli testnet: 0x5b62ccB7fdA139185374c8f36FAa388c20E1387F

Interfaces

NameDescription
IJBSingleTokenPaymentTerminalStoreGeneral interface for the methods in this contract that interact with the blockchain's state according to the protocol's rules.

Inheritance

ContractDescription
ReentrancyGuardContract module that helps prevent reentrant calls to a function.

Constructor

/**
@param _directory A contract storing directories of terminals and controllers for each project.
@param _fundingCycleStore A contract storing all funding cycle configurations.
@param _prices A contract that exposes price feeds.
*/
constructor(
IJBDirectory _directory,
IJBFundingCycleStore _fundingCycleStore,
IJBPrices _prices
) {
directory = _directory;
fundingCycleStore = _fundingCycleStore;
prices = _prices;
}
  • _directory is an IJBDirectory contract storing directories of terminals and controllers for each project.
  • _fundingCycleStore is an IJBFundingCycleStore contract storing all funding cycle configurations.
  • _prices is an IJBPrices contract that exposes price feeds.

Properties

FunctionDefinition
directory

Traits

  • immutable

Returns

fundingCycleStore

Traits

  • immutable

Returns

prices

Traits

  • immutable

Returns

balanceOf

Params

Returns

  • uint256
usedOverflowAllowanceOf

Params

Returns

  • uint256
usedDistributionLimitOf

Params

Returns

  • uint256

Read

FunctionDefinition
currentOverflowOf

Params

  • uint256 _projectId

Returns

  • uint256 currentOverflow
currentTotalOverflowOf

Params

  • uint256 _projectId

Returns

  • uint256 currentTotalOverflow
currentReclaimableOverflowOf

Params

Returns

  • uint256 reclaimableOverflow
currentReclaimableOverflowOf

Params

  • uint256 _projectId
  • uint256 _tokenCount
  • uint256 _totalSupply
  • uint256 _overflow

Returns

  • uint256 reclaimableOverflow

Write

FunctionDefinition
recordPaymentFrom

Traits

Params

  • address _payer
  • JBTokenAmount _amount
  • uint256 _projectId
  • address _beneficiary
  • uint256 _baseWeightCurrency
  • address _beneficiary
  • string _memo
  • bytes _metadata

Returns

recordDistributionFor

Traits

Params

  • uint256 _projectId
  • uint256 _amount
  • uint256 _currency

Returns

recordUsedAllowanceOf

Traits

Params

  • uint256 _projectId
  • uint256 _amount
  • uint256 _currency

Returns

recordRedemptionFor

Traits

Params

  • address _holder
  • uint256 _projectId
  • uint256 _tokenCount
  • address payable _beneficiary
  • string _memo
  • bytes _metadata

Returns

recordAddedBalanceFor

Traits

Params

  • uint256 _projectId
  • uint256 _amount
recordMigration

Traits

Params

  • uint256 _projectId

Returns

  • uint256 balance