Conversation
- Clean up unused imports in AVNU middleware - Update mainnet contract hashes in config.json - Rename SDK package to @forge_yields/starknet_vault_kit_sdk - Add yarn.lock for SDK dependencies
- Add complete VaultCuratorSDK implementation with support for all vault operations - Include interfaces for deposit, mint, withdraw, redeem, and multi-route swap - Add helper methods for common operations with approval handling - Implement Merkle proof generation for secure vault management - Add example test file and vault configuration - Update tsconfig to include examples directory
- Extract fee calculation to `_calculate_fee_shares` helper method - Remove owner fee exemption test case for cleaner implementation - Clean up unused imports in integration tests - Implement proper ERC4626 fee configuration with custom fee calculations
- Add MockERC721Receiver contract for testing - Implement full ERC721ABI with safe transfer support - Add ERC721 receiver validation in redeem request transfers - Update vault allocator with ERC721ReceiverMixin - Add receiver deployment utilities for testing - Replace unsafe transfers with safe_transfer_from in tests
feat: new classes
- Add Starkgate decoder and sanitizer components - Add Extended decoder and sanitizer components - Implement Starkgate integration interface - Add merkle tree integrations for Extended and Starkgate protocols
fix: non custodial vault deployment
fix: starkgate integration
- Add initiate_token_withdraw function to IStarkgateABI interface - Add starkgate_middleware module to lib.cairo - Create new starkgate middleware directory structure
- Split Starkgate ABI interface to separate withdraw functionality - Add comprehensive view functions to middleware interface - Refactor variable naming for clarity (l2_token_to_send -> token_to_bridge) - Add rate limiting configuration and view methods - Improve balance tracking and slippage calculations
- Add l1_recipient field to StarkgateMiddleware storage - Add get_l1_recipient method to interface and implementation - Validate l1_recipient parameter in initiate_withdraw function - Add invalid_l1_recipient error for validation failures - Import EthAddress type in interface and errors modules
- Add harvest function to Ekubo adapter for claiming rewards from external contracts - Derive owner from vault_allocator in Ekubo adapter constructor - Add defi_spring_decoder_and_sanitizer module - Add fyWBTC decoder and sanitizer - Improve merkle tree leaf descriptions for Ekubo operations - Update deployment scripts with new contract parameters for AvnuMiddleware - Refactor test creator module structure - Add new deployed contract addresses to config
… utility scripts - Rename vault to vault_allocator throughout AssetTransferPod component for clarity - Extract get_computed_min function in Avnu middleware and expose via interface - Fix Paradex GigaVault middleware to use correct vault_allocator reference - Add deployAssetTransferPod.ts script for pod deployment - Add setManager.ts utility script for updating vault allocator manager - Update config with new contract addresses
Support hyperlane bridge in SDK
…ware integrations Introduce a reusable BaseMiddleware component that encapsulates common middleware functionality including price router, vault allocator, rate limiting config, and slippage management. Refactor all existing middlewares (Avnu, Hyperlane, Starkgate, CCTP) to use this base component. Also separate merkle tree integrations into direct protocol calls vs middleware-based calls, update Hyperlane decoder to use transfer_remote signature matching warp routes, and fix Starkgate to use EthAddress for L1 addresses.
- Add fork configurations for Starkgate, CCTP, Hyperlane, and Base middleware tests - Add address registry entries for USN, USDC_CCTP, bridges, and price router - Add set_token_balance utilities for direct storage manipulation in tests - Add middleware test modules for cross-chain integration testing
- Extract protocol-specific logic into dedicated integration modules (AVNU, CCTP, Ekubo, ERC4626, Hyperlane, Starkgate, Vesu V2) - Add TypeScript interfaces for all operation types - Add DeFi Spring rewards claiming integration (Cairo) - Add SDK creator test and examples for new integrations - Pin fork block number for deterministic tests - Remove unused vault config JSON files
Merge Forge main progress
Update test to use the new function signature that accepts a Span<StarkgateConfig> instead of individual parameters.
Add Starkgate middleware to SDK
- Rename Hyperlane/CCTP functions to include "Middleware" suffix for clarity - Fix leaf matching to use BigInt() comparison instead of string comparison to handle address format differences (hex vs decimal) - Update types, README, and examples to reflect naming changes
- Upgrade Cairo/Scarb from 2.12.0 to 2.14.0 - Upgrade OpenZeppelin from 3.0.0-alpha.1 to 3.0.0-alpha.3 - Upgrade starknet.js from 7.6.4 to 9.2.1 - Update Account constructor to use new object syntax - Add id parameter to Ekubo adapter harvest function for updated reward claim interface - Update deployed contract addresses for EkuboAdapter and FyWBTCDecoderAndSanitizer
chore: bump Cairo to 2.14.0 and starknet.js to 9.2.1
There was a problem hiding this comment.
Pull request overview
This is a synchronization PR that includes dependency updates, new SDK functionality for vault curator operations, and TypeScript configuration adjustments.
Key changes:
- Dependency registry migration from yarnpkg.com to npmjs.org URLs
- New VaultCuratorSDK implementation with support for multiple DeFi integrations (ERC4626, AVNU, Starkgate, Hyperlane, CCTP, Vesu V2, Ekubo)
- New utility function for formatting calldata for block explorers
- TypeScript configuration adjusted to include examples directory
- Version bump from 0.1.0 to 0.1.1
Reviewed changes
Copilot reviewed 134 out of 138 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/yarn.lock | Dependency lockfile updates with registry URL changes and version resolution |
| sdk/tsconfig.json | TypeScript configuration updated to include examples directory with modified rootDir |
| sdk/src/utils/calldata.ts | New formatCalldataForExplorer utility for block explorer integration |
| sdk/src/types/index.ts | New type definitions for bridge operations (Starkgate, Hyperlane, CCTP) |
| sdk/src/index.ts | Export new bridge-related types |
| sdk/src/curator/types.ts | Complete type definitions for curator SDK operations |
| sdk/src/curator/integrations/* | Integration modules for various DeFi protocols (ERC4626, AVNU, bridges, Vesu, Ekubo) |
| sdk/src/curator/index.ts | Main VaultCuratorSDK implementation with Merkle tree proof generation |
| sdk/package.json | Version bump to 0.1.1 |
| sdk/examples/test_vesu_v2.ts | Example demonstrating Vesu V2 lending/borrowing operations |
| .tool-versions | New scarb version specification |
Files not reviewed (1)
- scripts/pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "declaration": true, | ||
| "outDir": "./dist", | ||
| "rootDir": "./src", | ||
| "rootDir": "./", |
There was a problem hiding this comment.
Changing rootDir from ./src to ./ will include files from all directories in compilation, potentially including test files and examples. This may lead to unintended files being compiled into the distribution. Consider using the exclude option more explicitly or keeping rootDir as ./src and adjusting the include paths if you need to reference examples from source files.
|
|
||
| // Recipient address on destination chain (as u256) | ||
| // 0x732357e321Bf7a02CbB690fc2a629161D7722e29 | ||
| const MINT_RECIPIENT_LOW = "44858727236356512580505469151245119017"; |
There was a problem hiding this comment.
Unused variable MINT_RECIPIENT_LOW.
| // Recipient address on destination chain (as u256) | ||
| // 0x732357e321Bf7a02CbB690fc2a629161D7722e29 | ||
| const MINT_RECIPIENT_LOW = "44858727236356512580505469151245119017"; | ||
| const MINT_RECIPIENT_HIGH = "1931696099"; |
There was a problem hiding this comment.
Unused variable MINT_RECIPIENT_HIGH.
| target: usdcToEthSwap.target, | ||
| }); | ||
|
|
||
| const usdcToEthCall = sdk.buildCall([approveUSDC, usdcToEthSwap]); |
There was a problem hiding this comment.
Unused variable usdcToEthCall.
| target: strkToUsdcSwap.target, | ||
| }); | ||
|
|
||
| const strkToUsdcCall = sdk.buildCall([approveSTRK, strkToUsdcSwap]); |
There was a problem hiding this comment.
Unused variable strkToUsdcCall.
| // 1. BRING LIQUIDITY | ||
| // ============================================ | ||
| console.log("1. BRING LIQUIDITY"); | ||
| const bringLiquidityOp = sdk.bringLiquidity({ |
There was a problem hiding this comment.
Unused variable bringLiquidityOp.
| target: mintOp.target, | ||
| }); | ||
|
|
||
| const mintCall = sdk.buildCall([mintOp]); |
There was a problem hiding this comment.
Unused variable mintCall.
| selector: requestRedeemOp.selector, | ||
| }); | ||
|
|
||
| const requestRedeemCall = sdk.buildCall([requestRedeemOp]); |
There was a problem hiding this comment.
Unused variable requestRedeemCall.
| selector: claimRedeemOp.selector, | ||
| }); | ||
|
|
||
| const claimRedeemCall = sdk.buildCall([claimRedeemOp]); |
There was a problem hiding this comment.
Unused variable claimRedeemCall.
| selector: borrowOp.selector, | ||
| }); | ||
|
|
||
| const borrowCall = sdk.buildCall([borrowOp]); |
There was a problem hiding this comment.
Unused variable borrowCall.
- Add LZ integration interfaces (SendParam, MessagingFee, OFTSendResult) - Add LZ middleware contract for cross-chain bridging with claim - Add LZ decoder and sanitizer components - Add merkle tree leaf creation for direct OFT and middleware - Add SDK bridgeLZ and bridgeLZMiddleware functions - Remove permissionless claim functions from SDK (Starkgate, Hyperlane, CCTP, LZ) - Add fork tests for LZ middleware - Update test.json with LZ merkle leaves
Add missing approve leaf for debt assets to allow the pool contract to pull tokens during debt repayment.
No description provided.