Label: complexity: high
Points: 200
Description
Recipients currently receive their full share the moment an invoice is released. This issue adds an optional vesting_cliff: Option<u64> (ledger timestamp) per invoice — funds are held in the contract until the cliff passes, after which any address can call claim(invoice_id, recipient) to transfer the recipient's share.
Technical Context
Involves types.rs (add vesting_cliff: Option<u64>, claimed: Vec<bool>), lib.rs. In _release(), if cliff is set, mark status Released but do not transfer. Add claim(env, invoice_id, recipient) that checks cliff passed and claimed[i] is false, then transfers.
Acceptance Criteria
Label: complexity: high
Points: 200
Description
Recipients currently receive their full share the moment an invoice is released. This issue adds an optional
vesting_cliff: Option<u64>(ledger timestamp) per invoice — funds are held in the contract until the cliff passes, after which any address can callclaim(invoice_id, recipient)to transfer the recipient's share.Technical Context
Involves
types.rs(addvesting_cliff: Option<u64>,claimed: Vec<bool>),lib.rs. In_release(), if cliff is set, mark statusReleasedbut do not transfer. Addclaim(env, invoice_id, recipient)that checks cliff passed andclaimed[i]is false, then transfers.Acceptance Criteria
_release()holds funds when cliff is setclaim()before cliff panics with"cliff not reached"claim()after cliff transfers correct amount to recipientcargo clippypasses with zero warnings