Repository navigation
feat(contract): implement pool-manager finance_invoice() with limit checks - #58
Merged
codemagician1949 merged 1 commit intoAug 21, 2026
Conversation
kulayddon
force-pushed
the
feat/issue-19-finance-invoice-limits
branch
3 times, most recently
from
August 19, 2026 15:35
17ba95f to
bbb36c0
Compare
…hecks - set_concentration_limits() configures per-buyer/per-SME concentration caps (basis points of total pool capital) - finance_invoice() checks both caps plus the existing pool utilisation cap (via finance()), returning a typed ContractError if either would be breached - On success, cross-contract calls into invoice-registry's assign() entrypoint (env.invoke_contract) to transition the invoice to the pool - Tracks cumulative per-buyer/per-SME exposure in persistent storage, with a marker field on each key so storage slots can't collide (contracttype tuple structs have no type discriminant) - InvoiceFinanced event emitted - Tests: successful finance + real cross-contract assignment (registers both contracts), buyer-limit breach errors, pool-utilisation breach errors Closes IntensifierLab#19
kulayddon
force-pushed
the
feat/issue-19-finance-invoice-limits
branch
from
August 21, 2026 01:05
bbb36c0 to
f2eca75
Compare
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.
Closes #19
set_concentration_limits()configures per-buyer/per-SME concentration caps (bps of total pool capital)finance_invoice()checks both caps plus the existing pool utilisation cap (viafinance()), rejecting the call if either would be breachedassign()entrypoint (env.invoke_contract) to transition the invoice to the poolInvoiceFinancedevent emitted