Skip to main content

3.1 Specs

See this proposal for context.

Versions are on NPM under @jbx-protocol/juice-contracts-v3 (3.1.0) and @jbx-protocol/juice-721-delegate (5.0.1)

Spec changes from JBControllerJBController3.1

See full code diff here https://www.diffchecker.com/bEuD9b4b/

  1. Adherence to IJBController3_1, and no longer an adherence to IJBController.
  2. Addition of a fundAccessConstraintsStore property of type IJBFundAccessConstraintStore, which points to a contract that exposes two view functions that were previously exposed directly from the controller:
    • function distributionLimitOf(uint256 _projectId, uint256 _configuration, IJBPaymentTerminal _terminal, address _token) external view returns (uint256, uint256)
    • function overflowAllowanceOf(uint256 _projectId, uint256 _configuration, IJBPaymentTerminal _terminal, address _token) external view returns (uint256, uint256)
  3. No more availability of the following function signatures:
    • function reservedTokenBalanceOf(uint256 _projectId, uint256 reservedRate) external view returns (uint256)
      • new one removes _reservedRate argument
    • function totalOutstandingTokensOf(uint256 _projectId, uint256 _reservedRate) external view returns (uint256)
      • new one removes _reservedRate argument
    • function distributionLimitOf(uint256 _projectId, uint256 _configuration, IJBPaymentTerminal _terminal, address _token) external view returns (uint256, uint256)
      • moved to fundAccessConstraintStore property as described above (#2)
    • function overflowAllowanceOf(uint256 _projectId, uint256 _configuration, IJBPaymentTerminal _terminal, address _token) external view returns (uint256, uint256)
      • moved to fundAccessConstraintStoreproperty as described above (#2).
  4. New availability of the following function signatures:
    • function reservedTokenBalanceOf(uint256 _projectId) external view returns (uint256)
    • function totalOutstandingTokensOf(uint256 _projectId) public view returns (uint256)

Spec changes from JBPayoutRedemptionPaymentTerminalJBPayoutRedemptionPaymentTerminal3.1

See full code diff here https://www.diffchecker.com/7Zf5CnrL/

  1. Adherence to IJBPayoutRedemptionPaymentTerminal3_1, and no longer an adherence to IJBPayoutRedemptionPaymentTerminal.

  2. The standard addToBalanceOf call no longer refunds held fees. A new overloaded function signature with an added explicit parameter has been added for adding to balance with refunding held fees. See the new event signatures below.

  3. Payouts from one project to other projects or allocators that revert will be caught and funds will be returned to the paying project, instead of reverting the entire distribution altogether. This include fees paid down to the protocol project.

  4. No more availability of the following function signatures:

    • function distributePayoutsOf(uint256 _projectId, uint256 _amount, uint256 _currency, address _token, uint256 _minReturnedTokens, string calldata _memo) external virtual returns (uint256 netLeftoverDistributionAmount)
      • new one replaces _memo with _metadata
    • function useAllowanceOf(uint256 _projectId, uint256 _amount, uint256 _currency, address _token, uint256 _minReturnedTokens, address payable _beneficiary, string memory memo) external virtual returns (uint256 netDistributedAmount)
      • new one adds metadata
  5. New availability of the following function signatures:

    • function distributePayoutsOf(uint256 _projectId, uint256 _amount, uint256 _currency, address _token, uint256 _minReturnedTokens, bytes calldata _metadata) external virtual returns (uint256 netLeftoverDistributionAmount)
    • function useAllowanceOf(uint256 _projectId, uint256 _amount, uint256 _currency, address _token, uint256 _minReturnedTokens, address payable _beneficiary, string memory _memo, bytes calldata _metadata) external virtual returns (uint256 netDistributedAmount)
    • function addToBalanceOf(uint256 _projectId, uint256 _amount, address _token, bool _shouldRefundHeldFees, string calldata _memo, bytes calldata _metadata) public payable virtual
  6. New event signatures:

Spec changes from JBTiered721DelegateJBTiered721Delegate3.1

  1. The JB721TierParams structs sent when adding new tiers have new/revised properties to allow for royalties and categorization.
  2. Send category of 1 until further notice for default behavior.
  3. The JB721Tier structs returned when paging tiers have new/revised properties with info about royalties and categorization.
  4. Tiers can be paged by category. Send 0 to retrieve tiers from all categories. See here.
  5. Owner can set a tier's encoded IPFS URI after the tier has been made. See here.
  6. Tiers are now returned in chronological order of being added. New tiers added to a category are returned before previously added tiers, kind of like an activity feed of mintable posts.