@bananapus/distributor-v6 0.0.33 → 0.0.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/package.json +2 -2
- package/references/operations.md +2 -1
- package/src/JB721Distributor.sol +335 -248
- package/src/JBDistributor.sol +344 -390
- package/src/JBTokenDistributor.sol +53 -69
- package/src/interfaces/IJB721Distributor.sol +139 -0
- package/src/interfaces/IJBDistributor.sol +22 -38
- package/src/structs/JBBorrowContext.sol +2 -0
- package/src/structs/JBClaimContext.sol +5 -0
- package/src/structs/JBVestContext.sol +5 -0
- package/src/structs/JBVestingLoan.sol +2 -0
- package/src/structs/JBTokenSnapshotData.sol +0 -11
package/README.md
CHANGED
|
@@ -77,6 +77,13 @@ This repo does not explain why an allocation exists. It only defines how funded
|
|
|
77
77
|
collectible instead of locked in a vesting position
|
|
78
78
|
- `releaseForfeitedRewards` matters for 721 distributions; token-vote distributions do not have the same burned-token
|
|
79
79
|
forfeiture path
|
|
80
|
+
- reward, vesting, and loan accounting carries a `groupId`: `0` is the all-tiers group (the default pool), a non-zero
|
|
81
|
+
group is `keccak256(abi.encode(tierIds))`. The tier overloads live on `JB721Distributor`; the base is tier-agnostic.
|
|
82
|
+
Split funding via `processSplitWith` always lands in group 0 — a split cannot carry a tier set; tier-scoped pots
|
|
83
|
+
require the explicit `fund(hook, tierIds, token, amount)` overload, and claims/collections must pass the same
|
|
84
|
+
`tierIds` to hit that group
|
|
85
|
+
- tier-scoped 721 pots weigh each eligible NFT by its tier's `votingUnits` against a summed
|
|
86
|
+
`getPastTierVotingUnits` denominator, which requires `@bananapus/721-hook-v6 >= 0.0.63` for that checkpoints API
|
|
80
87
|
- snapshot timing is part of the trusted surface
|
|
81
88
|
- this repo settles distributions, but it does not prove the upstream entitlement math was correct
|
|
82
89
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bananapus/distributor-v6",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.35",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"deploy:testnets": "source ./.env && npx sphinx propose ./script/Deploy.s.sol --networks testnets"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@bananapus/721-hook-v6": "^0.0.
|
|
27
|
+
"@bananapus/721-hook-v6": "^0.0.63",
|
|
28
28
|
"@bananapus/core-v6": "^0.0.72",
|
|
29
29
|
"@bananapus/permission-ids-v6": "^0.0.27",
|
|
30
30
|
"@openzeppelin/contracts": "5.6.1",
|
package/references/operations.md
CHANGED
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
| `JBDistributor` vesting math | Claim totals, `totalVestingAmountOf`, and pool balances still reconcile across rounds |
|
|
8
8
|
| `JBTokenDistributor` checkpoint logic | `getPastVotes` and `getPastTotalSupply` are read at the intended round-start block |
|
|
9
9
|
| `JB721Distributor` stake math | Minted, remaining, and burned supply still produce the intended tier-weighted total stake |
|
|
10
|
-
| `processSplitWith` | Allowance-based `transferFrom` flow preserves actual received balances |
|
|
10
|
+
| `processSplitWith` | Allowance-based `transferFrom` flow preserves actual received balances; split funding still records under `groupId == 0` only (a split cannot carry a tier set) |
|
|
11
|
+
| `groupId` threading | The `groupId` dimension stays consistent across the reward (`rewardRoundOf`), vesting (`vestingDataOf`, `latestVestedIndexOf`, `nextClaimRoundOf`), and loan (`activeVestingLoanIdOf`, `JBVestingLoan`) maps; the `tierIds` overloads (`fund`/`beginVesting`/`collectVestedRewards`/`borrowAgainstVesting`/`burnExpiredRewards`/`releaseForfeitedRewards`) live on `JB721Distributor` and derive the group ID via `_groupIdFor`; the base is tier-agnostic and group 0 is the default all-tiers pool |
|
|
11
12
|
| Deployment inputs | `DIRECTORY_ADDRESS`, `ROUND_DURATION`, and `VESTING_ROUNDS` match the intended chain and operator plan |
|
|
12
13
|
|
|
13
14
|
## Common failure modes
|