-
Notifications
You must be signed in to change notification settings - Fork 2
Implement Token Pools #129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
252107c
to
714dd93
Compare
There was a problem hiding this 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 ofDictionary.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.
cbe5beb
to
476ad42
Compare
4128b06
to
d15dbb9
Compare
fun LockReleaseTokenPool.tokenPool(self): TokenPool<LockReleaseTokenPool> { | ||
val tokenPoolData = lazy self.data.tokenPoolData.load(); | ||
|
||
return TokenPool<LockReleaseTokenPool>{ |
There was a problem hiding this comment.
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?
/// 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); |
There was a problem hiding this comment.
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.
d15dbb9
to
9e5da2d
Compare
84a8f0b
to
89aeb19
Compare
9e5da2d
to
e27bd49
Compare
e27bd49
to
719e287
Compare
89aeb19
to
2df4447
Compare
3e2424e
to
100be15
Compare
No description provided.