Repository navigation
feat(contract): add linear vesting streams - #155
Ezekiel146 wants to merge 14 commits into
Conversation
|
@Ezekiel146 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
This PR has merge conflicts with |
|
@Ezekiel146 Thanks for the PR. It can't be merged yet. To unblock it: Merge conflicts: this branch conflicts with Push to this same branch and CI will re-run. Once it's green and conflict-free, it'll be reviewed for merge. |
# Conflicts: # ARCHITECTURE_ESSENTIALS.md # README.md # ROADMAP.md # contracts/escrow/src/lib.rs # docs/threat-model.md
|
@afeezorobsco-cyber I resolved the conflicts with main, integrated streamed vesting with the current quorum, allowlist, and settlement paths, and refreshed the generated contract bindings. The focused streamed-vesting tests pass. Please review and merge when ready. |
|
@Ezekiel146 Thanks for merging git fetch upstream
git merge upstream/main # or: git rebase upstream/main
# resolve the conflicts (usually contracts/escrow/src/lib.rs, the create_escrow
# call sites in tests, ROADMAP.md and ARCHITECTURE_ESSENTIALS.md), then:
cargo test # commit any updated test_snapshots/
./scripts/check-generated-bindings.sh # regenerate the SDK bindings if it fails
git pushOnce CI is green and the conflicts are gone, it can be merged. |
|
@afeezorobsco-cyber I resolved the conflict with current |
|
@Ezekiel146 This PR now has merge conflicts with git fetch upstream # upstream = https://github.com/DocForum/docforum-escrow.git
git rebase upstream/main
# resolve the conflicts, re-run the tests, then:
git push --force-with-leaseThe usual culprits are shared files like Automated message. It won't repeat unless the PR conflicts again after your next push. |
# Conflicts: # contracts/escrow/src/lib.rs # sdk/src/generated/contract-client.ts
|
The branch now includes the latest main and the merge conflicts are resolved; the streamed release behavior and regenerated contract bindings are retained. The PR description still includes Closes #44. @afeezorobsco-cyber, please review the updated PR and merge it once the checks pass. |
|
@Ezekiel146 This PR now has merge conflicts with git fetch upstream # upstream = https://github.com/DocForum/docforum-escrow.git
git rebase upstream/main
# resolve the conflicts, re-run the tests, then:
git push --force-with-leaseThe usual culprits are shared files like Automated message. It won't repeat unless the PR conflicts again after your next push. |
|
@Ezekiel146 CI is failing on this branch against the latest Soroban contract (test + wasm build) Your change alters contract behaviour that the committed Soroban snapshots record. Run This PR also conflicts with |
|
@afeezorobsco-cyber I resolved the merge conflicts against the latest main, preserved this PR’s feature, regenerated the contract bindings, and updated the affected test snapshots. The escrow contract tests pass. Could you please review the update and merge when ready? |
|
@Ezekiel146 CI is failing on this branch against the latest SDK bindings match contract WASM
cd contracts/escrow && cargo build --target wasm32v1-none --release
stellar contract bindings typescript --wasm target/wasm32v1-none/release/docforum_escrow.wasm --output-dir /tmp/escrow-bindings --overwrite
cp /tmp/escrow-bindings/src/index.ts ../../sdk/src/generated/contract-client.ts( |
|
@Ezekiel146 This PR now has merge conflicts with git fetch upstream # upstream = https://github.com/DocForum/docforum-escrow.git
git rebase upstream/main
# resolve the conflicts, re-run the tests, then:
git push --force-with-leaseThe usual culprits are shared docs like Automated message. It won't repeat unless the PR conflicts again after your next push. |
Resolved conflicts in ARCHITECTURE_ESSENTIALS.md, ROADMAP.md, and contracts/escrow/src/lib.rs, keeping main's behaviour (two-party releaser rotation, pooled escrows, release-not-before, etc.) and the linear vesting stream feature from this branch. - VestingSchedule/VestingInfo types, DataKey::Vesting/Withdrawn, and the new errors (PoolInsufficient=35, NotStreamed=36, InvalidVestingSchedule=37, NothingToWithdraw=38, StreamTopUpUnsupported=39) are appended after main's existing codes (1-34), so no existing variant's discriminant changed. - create_streamed_escrow, get_vesting, and withdraw are added as new entry points alongside main's create_escrows/create_pooled_escrow/ rotate_releaser. - settle() now branches on an optional vesting schedule: a release pays the payee whatever is still unwithdrawn; a refund (or payer cancel) pays the vested-but-unwithdrawn amount to the payee and the unvested remainder to the stored refund_to. Non-streamed escrows are unchanged. - top_up rejects streamed escrows (StreamTopUpUnsupported), since a stream's total is fixed at creation. - Moved the vesting ADR to docs/adr/0012 (0008 was taken by main's payee-acceptance ADR) and cross-referenced refund_to/ADR 0009. - Added changelog.d/44-streamed-vesting.md instead of editing ROADMAP.md's Changelog section (changelog.d/README.md convention). - Took main's generated sdk/src/generated/contract-client.ts for now; regenerating from the merged contract is the next step.
Regenerated sdk/src/generated/contract-client.ts with stellar CLI 28.1.0 against the merged contract WASM, adding create_streamed_escrow, withdraw, get_vesting, VestingSchedule/VestingInfo, and errors 35-39. scripts/check-generated-bindings.sh confirms the committed file matches.
Merging main added a dedicated DataKey::Status(id) storage entry (for get_status) that the vesting branch's escrows did not previously write. Re-running cargo test after the merge regenerates the six streamed- vesting snapshots with that entry; no other content changed.
Same cause as the escrow snapshot update: main added DataKey::Status(id) for get_status, which now shows up in this cross-crate integration test's captured storage. Re-ran cargo test twice; only this one snapshot changes and it is byte-identical on the second run.
|
Merged
Bindings. Regenerated Tests. CI checks run locally:
Diff vs One pre-existing gap worth flagging (not from this merge): |
|
@afeezorobsco-cyber this is ready for a look whenever you have a moment. |
|
@Ezekiel146 This PR now has merge conflicts with git fetch upstream # upstream = https://github.com/DocForum/docforum-escrow.git
git rebase upstream/main
# resolve the conflicts, re-run the tests, then:
git push --force-with-leaseThe usual culprits are shared docs like Automated message. It won't repeat unless the PR conflicts again after your next push. |
|
@afeezorobsco-cyber I updated this branch to current |
|
@Ezekiel146 This PR now has merge conflicts with git fetch upstream # upstream = https://github.com/DocForum/docforum-escrow.git
git rebase upstream/main
# resolve the conflicts, re-run the tests, then:
git push --force-with-leaseThe usual culprits are shared docs like Automated message. It won't repeat unless the PR conflicts again after your next push. |
|
@Ezekiel146 Heads-up: #268 just changed how contract PRs work in this repo. Your PR changes
This should also make your next merge from |
# Conflicts: # ROADMAP.md # contracts/escrow/src/lib.rs # contracts/escrow/tests/create_escrow.rs # sdk/src/generated/contract-client.ts
|
Synced this branch with current main and resolved the merge conflict. Kept CONTRACT_VERSION at 2.3.0, added the required issue #44 minor fragment with provisional stream error codes 4400–4404, and regenerated the SDK binding. Full Rust tests, the contract-change check, and generated-binding check pass. GitHub reports mergeable=true; Malware scan passed. @afeezorobsco-cyber, please recheck when convenient. |
|
@Ezekiel146 This PR now has merge conflicts with git fetch upstream # upstream = https://github.com/DocForum/docforum-escrow.git
git rebase upstream/main
# resolve the conflicts, re-run the tests, then:
git push --force-with-leaseThe usual culprits are shared docs like Automated message. It won't repeat unless the PR conflicts again after your next push. |
Summary
end, the full amount is vested.Validation:
git diff --checkpassed. Tests/build/install were not run per contributor workflow. Generated SDK bindings and testnet deployment remain pending.Closes #44