Skip to content

Conversation

patricios-space
Copy link
Collaborator

@patricios-space patricios-space commented Aug 21, 2025

No description provided.

@patricios-space patricios-space force-pushed the feat/tokenpools/ratelimiter branch 2 times, most recently from 252107c to 714dd93 Compare September 2, 2025 20:32
@patricios-space patricios-space changed the title Implement Token Pools Implement Token Pools + E2E test Sep 5, 2025
@patricios-space patricios-space marked this pull request as ready for review September 5, 2025 15:22
@Copilot Copilot AI review requested due to automatic review settings September 5, 2025 15:22
@patricios-space patricios-space requested a review from a team as a code owner September 5, 2025 15:22
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements the first iteration of Token Pools functionality for the CCIP (Cross-Chain Interoperability Protocol) project, introducing a POC (Proof of Concept) implementation with corresponding E2E tests for onramp token transfers.

  • Adds comprehensive Token Pool infrastructure with LockReleaseTokenPool implementation
  • Implements rate limiting, allowlist management, and cross-chain configuration
  • Provides TypeScript wrappers and test infrastructure for Token Pool contracts
  • Creates E2E tests demonstrating token transfer functionality through the CCIP router

Reviewed Changes

Copilot reviewed 42 out of 45 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
contracts/wrappers/utils.ts Adds Slice import and CellLoader type for enhanced cell parsing capabilities
contracts/wrappers/pools/ New module with comprehensive Token Pool wrappers including LockReleaseTokenPool, TokenPools, and RateLimiter
contracts/wrappers/jetton/ Adds JettonCode utilities for loading compiled jetton contracts
contracts/wrappers/ccip/ Updates Router and FeeQuoter with improved message builders and token amount handling
contracts/tests/pools/ Complete test suite for Token Pools including setup classes and E2E specifications
contracts/contracts/pools/ Core Tolk implementation of LockReleaseTokenPool with storage, messages, and business logic
contracts/contracts/lib/ Supporting libraries for token pools, rate limiting, and utility functions
Comments suppressed due to low confidence (1)

contracts/wrappers/pools/LockReleaseTokenPool.ts:1

  • Dictionary value type mismatch: should use Dictionary.Values.Bool() instead of Dictionary.Values.Address() since the allowList is a Set where the values represent boolean membership status.
import {

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@patricios-space patricios-space force-pushed the feat/tokenpools/ratelimiter branch 2 times, most recently from cbe5beb to 476ad42 Compare September 5, 2025 16:57
@smartcontractkit smartcontractkit deleted a comment from Copilot AI Sep 8, 2025
@patricios-space patricios-space force-pushed the feat/tokenpools/ratelimiter branch 2 times, most recently from 4128b06 to d15dbb9 Compare September 9, 2025 14:11
fun LockReleaseTokenPool.tokenPool(self): TokenPool<LockReleaseTokenPool> {
val tokenPoolData = lazy self.data.tokenPoolData.load();

return TokenPool<LockReleaseTokenPool>{
Copy link
Collaborator

@vicentevieytes vicentevieytes Sep 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is TokenPool<T> defined? cannot find it anywhere. Should this be IPool<LockReleaseTokenPool> instead?

Comment on lines +61 to +72
/// Load the contract storage as MCMS and handle the message
var lockReleaseTokenPool = LockReleaseTokenPool.load();

var tokenPool = lockReleaseTokenPool.tokenPool();

if (tokenPool.onInternalMessage(in.senderAddress, in.valueCoins, in.body)) {
lockReleaseTokenPool.data.tokenPoolData = tokenPool.data.toCell();
lockReleaseTokenPool.data.storeAsContractData();
return;
}

lockReleaseTokenPool.onInternalMessage(in.senderAddress, in.valueCoins, in.body);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not aligned with the feedback we received from the TON core team, I guess I'm ok with it but we should actually align ourselves on how to handle this kind of composition.

@patricios-space patricios-space changed the title Implement Token Pools + E2E test Implement Token Pools Sep 11, 2025
@patricios-space patricios-space changed the base branch from main to test/token-transfer-e2e September 11, 2025 19:08
@patricios-space patricios-space force-pushed the feat/tokenpools/ratelimiter branch from d15dbb9 to 9e5da2d Compare September 11, 2025 19:13
@patricios-space patricios-space force-pushed the feat/tokenpools/ratelimiter branch from 9e5da2d to e27bd49 Compare September 11, 2025 21:49
@patricios-space patricios-space force-pushed the feat/tokenpools/ratelimiter branch from e27bd49 to 719e287 Compare September 11, 2025 22:03
@patricios-space patricios-space marked this pull request as draft September 12, 2025 20:12
@patricios-space patricios-space force-pushed the test/token-transfer-e2e branch 4 times, most recently from 3e2424e to 100be15 Compare September 18, 2025 14:33
Base automatically changed from test/token-transfer-e2e to main September 18, 2025 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants