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 JBController
⇒ JBController3.1
See full code diff here https://www.diffchecker.com/bEuD9b4b/
- Adherence to
IJBController3_1
, and no longer an adherence toIJBController
. - Addition of a
fundAccessConstraintsStore
property of typeIJBFundAccessConstraintStore
, 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)
- No more availability of the following function signatures:
function reservedTokenBalanceOf(uint256 _projectId, uint256 reservedRate) external view returns (uint256)
- new one removes
_reservedRate
argument
- new one removes
function totalOutstandingTokensOf(uint256 _projectId, uint256 _reservedRate) external view returns (uint256)
- new one removes
_reservedRate
argument
- new one removes
function distributionLimitOf(uint256 _projectId, uint256 _configuration, IJBPaymentTerminal _terminal, address _token) external view returns (uint256, uint256)
- moved to
fundAccessConstraintStore
property as described above (#2)
- moved to
function overflowAllowanceOf(uint256 _projectId, uint256 _configuration, IJBPaymentTerminal _terminal, address _token) external view returns (uint256, uint256)
- moved to
fundAccessConstraintStore
property as described above (#2).
- moved to
- 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 JBPayoutRedemptionPaymentTerminal
⇒ JBPayoutRedemptionPaymentTerminal3.1
See full code diff here https://www.diffchecker.com/7Zf5CnrL/
Adherence to
IJBPayoutRedemptionPaymentTerminal3_1
, and no longer an adherence toIJBPayoutRedemptionPaymentTerminal
.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.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.
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
- new one replaces
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
- new one adds
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
New event signatures:
Spec changes from JBTiered721Delegate
⇒ JBTiered721Delegate3.1
- The
JB721TierParams
structs sent when adding new tiers have new/revised properties to allow for royalties and categorization. - Send category of 1 until further notice for default behavior.
- The
JB721Tier
structs returned when paging tiers have new/revised properties with info about royalties and categorization. - Tiers can be paged by category. Send 0 to retrieve tiers from all categories. See here.
- Owner can set a tier's encoded IPFS URI after the tier has been made. See here.
- 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.