Refactor/fix repeated parameters#76
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughRefactors escrow representation across multiple contracts and tests: replaces String-based Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
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 |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/smart-contracts/contracts/deployer/src/deployer.rs (1)
20-35:⚠️ Potential issue | 🟠 MajorAddress-based escrow API change is not fully propagated to callers.
The contract struct now expects
escrow_contract: Addressonly, but the codebase still sends staleescrow_idfields and encodes escrow contract as string instead of address, causing deployment transaction failures.Required caller updates
# apps/core/src/deploy/deploy.service.ts (deployParticipationToken) escrow_id: dto.escrowContractId, + escrow_contract: dto.escrowContractId,# apps/core/src/deploy/deploy.service.ts (deploy_all) - escrow_id: dto.escrowId, escrow_contract: dto.escrowContract,# apps/backoffice-tokenization/src/lib/tokenDeploymentService.ts - client.nativeString(escrowContractId), + client.nativeAddress(escrowContractId),# apps/investor-tokenization/src/lib/tokenDeploymentService.ts - client.nativeString(escrowContractId), + client.nativeAddress(escrowContractId),🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/smart-contracts/contracts/deployer/src/deployer.rs` around lines 20 - 35, DeployAllParams now expects escrow_contract: Address but callers still pass a stale escrow_id and encode the escrow as a string; update every call site that constructs DeployAllParams (and any helper builders) to stop using escrow_id and instead pass the escrow_contract as an Address value, ensure ABI/serialization encodes escrow_contract as an Address type (not string), and rename any variables or DTO fields from escrow_id -> escrow_contract to match DeployAllParams (e.g., where deploy_all, build_deploy_params, or similar functions construct the struct) so the deployment transaction sends an Address rather than a string.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@apps/smart-contracts/contracts/deployer/src/deployer.rs`:
- Around line 20-35: DeployAllParams now expects escrow_contract: Address but
callers still pass a stale escrow_id and encode the escrow as a string; update
every call site that constructs DeployAllParams (and any helper builders) to
stop using escrow_id and instead pass the escrow_contract as an Address value,
ensure ABI/serialization encodes escrow_contract as an Address type (not
string), and rename any variables or DTO fields from escrow_id ->
escrow_contract to match DeployAllParams (e.g., where deploy_all,
build_deploy_params, or similar functions construct the struct) so the
deployment transaction sends an Address rather than a string.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: c0223359-1c7e-44b2-bad2-439923a8b1ae
📒 Files selected for processing (8)
apps/smart-contracts/contracts/deployer/src/deployer.rsapps/smart-contracts/contracts/deployer/src/test.rsapps/smart-contracts/contracts/participation-token/src/contract.rsapps/smart-contracts/contracts/participation-token/src/metadata.rsapps/smart-contracts/contracts/participation-token/src/storage_types.rsapps/smart-contracts/contracts/participation-token/src/test.rsapps/smart-contracts/contracts/token-sale/src/test.rsapps/smart-contracts/contracts/vault-contract/src/test.rs
Summary by CodeRabbit
New Features
Refactor
Tests