Repository navigation
Feat/init defindex - #73
Conversation
|
Caution Review failedFailed to post review comments. Configuration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (5)
🧰 Additional context used🧬 Code graph analysis (2)contracts/escrow/src/contract.rs (1)
contracts/escrow/src/core/escrow.rs (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
WalkthroughIntroduces vault integration to the escrow contract: new public endpoints for vault deposits, address management, and a stored-address convenience; a manager method to send escrow-held tokens to a vault via cross-contract call; expanded roles and storage keys to include a vault operator and vault address; updates dispute authorization; removes tests. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Operator
participant EscrowContract
participant EscrowManager
participant Token as TokenClient
participant Vault as VaultContract
Operator->>EscrowContract: deposit_via_vault(operator, user, vault_addr, amounts_desired, amounts_min, invest)
note right of EscrowContract: Auth check: operator == roles.vault_operator<br/>User & operator auth
EscrowContract->>Vault: deposit(user, amounts_desired, amounts_min, invest)
Vault-->>EscrowContract: result
Operator->>EscrowContract: send_to_vault()
EscrowContract->>EscrowManager: send_to_vault(env)
EscrowManager->>Token: balance(escrow_trustline)
Token-->>EscrowManager: balance
EscrowManager->>Vault: deposit(escrow_addr, [balance], [0], invest=false)
Vault-->>EscrowManager: result
sequenceDiagram
autonumber
actor Platform
participant EscrowContract
participant Storage
Platform->>EscrowContract: set_vault_address(platform_addr, vault_addr)
note right of EscrowContract: Auth check: platform_addr == roles.platform_address
EscrowContract->>Storage: write(DataKey::VaultAddr, vault_addr)
Storage-->>EscrowContract: ok
Operator->>EscrowContract: deposit_via_vault_stored(operator, user, amounts_desired, amounts_min, invest)
EscrowContract->>Storage: read(DataKey::VaultAddr)
Storage-->>EscrowContract: vault_addr
EscrowContract->>EscrowContract: deposit_via_vault(..., vault_addr, ...)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Poem
Pre-merge checks and finishing touches and finishing touches❌ Failed checks (3 warnings)
✨ Finishing touches
🧪 Generate unit tests
✨ Finishing touches
🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
a6f3fef
into
Trustless-Work:defindex-escrow
Pull Request | Trustless Work
1. Issue Link
2. Brief Description of the Issue
3. Changes Made
4. Evidence After Solution
Loom Video - After Solution
5. Important Notes
If you don't use this template, you'd be ignored
Summary by CodeRabbit