Repository navigation
Tbd: bind cctFrom to the payer and remove the unused nomination path - #300
Merged
Merged
Conversation
cctFrom now moves only the caller's own deposit, unless the caller is the DvP contract passed to the Tbd constructor, which keeps settling on behalf of the payer. CCT_FROM_CALLER_ROLE is still required. Any other caller reverts with the new CctFromNotCaller error, so the payer rule lives in the contract rather than in how the role is assigned. The government-nomination path has had no consumer since bond cash legs moved to wNOK, so it is removed: the constructor loses its reserve argument, and govReserve, isGovernmentNominated, the reserve mint branch in _update and NotGovernmentNominated are gone. The TBD and wNOK setup scripts no longer allowlist the reserve on TBD Nordea or give it a wNOK allowance there. The DvP settlement fixture now constructs its TBDs with the DvP that settles, instead of deploying a second one afterwards. The NB Bond API deploys created banks with the six-argument constructor from refreshed Tbd ABI and bytecode artifacts, drops the government field from the TBD DTO (OpenAPI regenerated), and the Banking page drops the matching KPI. Contract reference, NatSpec pages and the TBD diagrams describe the caller rule. Tests: forge 393 passed (new: payer-only cctFrom and DvP settlement on behalf of the payer); nb-bond-api jest 254 passed; nb-ui vitest 125 passed.
2 of 3 tasks
operatorTransferByPartition no longer reads a destination partition from the first 32 bytes of data. Like transferByPartition, it now always moves units within the partition it is given and treats data and operatorData as opaque event payload. The internal _transferByPartition and _move helpers take a single partition, so a partition's supply changes only through mint and redemption, and ChangedPartition stays in IERC1410 as part of the standard surface but is never emitted. The bond stack never used partition changes: BondDvP always passes empty data. The transferByPartition NatSpec, which described a data-driven partition switch it never performed, is corrected. The BondToken invariant suite now runs two ISINs and a holder transfer action that names either partition in data, and checks supply against offering and holder balances per partition. Tests: forge 395 passed (new: an operator transfer stays in its source partition and emits no ChangedPartition; a unit moved with another partition in data does not reduce that partition's issuance headroom; extended invariants). The BondToken ABI is unchanged.
This was referenced Sep 28, 2026
Greaker
added a commit
that referenced
this pull request
Oct 2, 2026
Six plan folders under docs/plans/, each with intent, design, plan, and progress files, grounded in a review of the current development branch: - bond-coupon-maturity-correctness: per-holding coupon rounding, RATE auction gating after a cancel, matured partitions closed to new issuance, the BUYBACK cancel revert, and bond transfer eligibility. - ingestion-projection-correctness: abortable ingestion loop that closes its connection, chain-ordered log application, idempotent bond state, newest-first history, and finalisation that tolerates invalid bids. - nb-bond-api-hardening: per-signer nonces, one RFC 7807 error handler, liveness probe and chart defaults, scoped runtime image, cleanup. - nb-ui-correctness-and-hardening: router and error boundaries, one 401 path, matured KPI, live coupon preview, bidder soft delete, history card, nginx headers, dead-code removal. - sandbox-scripts-and-ci-hardening: flag precedence, failing readiness timeouts, command validation, bid-tool install, loopback ports, image pins, pin-drift check, CI gaps. - documentation-refresh: neutral deployment wording, plan-tree housekeeping, removed behaviour still documented, known issues, NatSpec source links, licence inventory. All plans are Proposed; the documentation index lists them. Four progress files note what changed on development after planning (#300 to #305) and which plan steps that makes moot.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Tbd.cctFromnow moves only the caller's own deposit, unless the caller is the DvP contract passed to the constructor; any other caller reverts withCctFromNotCaller.CCT_FROM_CALLER_ROLEis still required.Tbd/ITbd/Errors, the TBD and wNOK setup scripts, the NB Bond API TBD DTO (governmentfield; OpenAPI regenerated) and the Banking page KPI.TbdABI and bytecode artifacts (six-argument constructor). Contract reference, NatSpec pages and TBD diagrams describe the caller rule.First of four stacked contract PRs.
Test plan
cd contracts && forge fmt --check && forge build --sizes && bash ./check-verify-latest-mapping.sh && forge test -vvv(393 passed)cd services/nb-bond-api && npm run lint && npm run format:check && npm test && npm run build(jest 254)cd services/nb-ui && npm run format:check && npm run lint && npm test && npm run build(vitest 125)python3 scripts/verification/check-public-repo-hygiene.py && python3 scripts/verification/check-markdown-links.py