Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
157dcc1
add an upgrade registry and tests
FelixFan1992 Sep 9, 2025
9d7b6bf
update ccip tests
FelixFan1992 Sep 9, 2025
a71cca6
update ccip package
FelixFan1992 Sep 9, 2025
6e9bf72
update
FelixFan1992 Sep 9, 2025
7afffed
regen
FelixFan1992 Sep 9, 2025
1398fa2
no op
FelixFan1992 Sep 9, 2025
d6f29ae
Merge branch 'add-upgrade-registry' of ssh://github.com/smartcontract…
FelixFan1992 Sep 9, 2025
db329b8
revert tar tests
FelixFan1992 Sep 9, 2025
f53b5ff
add tar tests
FelixFan1992 Sep 9, 2025
cfc6fdd
fix token pool tests
FelixFan1992 Sep 9, 2025
e36b523
fix token pool tests 2
FelixFan1992 Sep 9, 2025
445dbc4
offramp & onramp
FelixFan1992 Sep 9, 2025
409a21c
fix ops tests
FelixFan1992 Sep 10, 2025
d89af5d
fix ccip onramp tests
FelixFan1992 Sep 10, 2025
c1ec4e5
Merge branch 'develop' into add-upgrade-registry
FelixFan1992 Sep 10, 2025
4b95d9d
update package id management functions
FelixFan1992 Sep 10, 2025
e22abd9
Merge branch 'develop' into add-upgrade-registry
faisal-chainlink Sep 10, 2025
83b6394
fix tests
FelixFan1992 Sep 10, 2025
2975840
update tests
FelixFan1992 Sep 10, 2025
cc74ae4
add usdc token pool support
FelixFan1992 Sep 11, 2025
6dad610
Merge branch 'develop' into add-usdc-token-pool-support
FelixFan1992 Sep 11, 2025
0218e30
Merge branch 'develop' into add-usdc-token-pool-support
FelixFan1992 Sep 11, 2025
07c56ac
Merge branch 'develop' into add-usdc-token-pool-support
FelixFan1992 Sep 11, 2025
5d64655
Merge branch 'develop' into add-usdc-token-pool-support
FelixFan1992 Sep 12, 2025
c10022b
Merge branch 'develop' into add-usdc-token-pool-support
FelixFan1992 Sep 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bindings/bind/compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func CompilePackage(packageName contracts.Package, namedAddresses map[string]str
}

// Special-case: update published-at of CCIP, CCIP Token Pool, & MCMs if it's a token pool package
if packageName == contracts.LockReleaseTokenPool || packageName == contracts.BurnMintTokenPool || packageName == contracts.ManagedTokenPool {
if packageName == contracts.LockReleaseTokenPool || packageName == contracts.BurnMintTokenPool || packageName == contracts.ManagedTokenPool || packageName == contracts.USDCTokenPool {
if err = updatePublishedAt(dstRoot, contracts.CCIP, namedAddresses["ccip"]); err != nil {
return PackageArtifact{}, fmt.Errorf("updating CCIP published-at: %w", err)
}
Expand Down
2,858 changes: 2,858 additions & 0 deletions bindings/generated/ccip/ccip_token_pools/usdc_token_pool/usdc_token_pool.go

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
package usdctokenpool

import (
"context"

"github.com/block-vision/sui-go-sdk/models"
"github.com/block-vision/sui-go-sdk/sui"

"github.com/smartcontractkit/chainlink-sui/bindings/bind"
module_usdc_token_pool "github.com/smartcontractkit/chainlink-sui/bindings/generated/ccip/ccip_token_pools/usdc_token_pool"
"github.com/smartcontractkit/chainlink-sui/contracts"
)

type USDCTokenPool interface {
Address() string
}

var _ USDCTokenPool = CCIPUSDCTokenPoolPackage{}

type CCIPUSDCTokenPoolPackage struct {
address string

usdcTokenPool module_usdc_token_pool.IUsdcTokenPool
}

func (p CCIPUSDCTokenPoolPackage) Address() string {
return p.address
}

func NewCCIPUSDCTokenPool(address string, client sui.ISuiAPI) (USDCTokenPool, error) {
usdcTokenPoolContract, err := module_usdc_token_pool.NewUsdcTokenPool(address, client)
if err != nil {
return nil, err
}

packageId, err := bind.ToSuiAddress(address)
if err != nil {
return nil, err
}

return CCIPUSDCTokenPoolPackage{
address: packageId,
usdcTokenPool: usdcTokenPoolContract,
}, nil
}

func PublishCCIPUSDCTokenPool(
ctx context.Context,
opts *bind.CallOpts,
client sui.ISuiAPI,
ccipAddress,
ccipTokenPoolAddress,
usdcCoinMetadataObjectId,
tokenMessengerMinterPackageId,
tokenMessengerMinterStateObjectId,
messageTransmitterPackageId,
messageTransmitterStateObjectId,
treasuryObjectId,
mcmsAddress,
mcmsOwnerAddress string) (USDCTokenPool, *models.SuiTransactionBlockResponse, error) {
artifact, err := bind.CompilePackage(contracts.USDCTokenPool, map[string]string{
"ccip": ccipAddress,
"ccip_token_pool": ccipTokenPoolAddress,
"usdc_token_pool": "0x0",
"usdc_coin_metadata_object_id": usdcCoinMetadataObjectId,
"token_messenger_minter_package_id": tokenMessengerMinterPackageId,
"token_messenger_minter_state": tokenMessengerMinterStateObjectId,
"message_transmitter_package_id": messageTransmitterPackageId,
"message_transmitter_state": messageTransmitterStateObjectId,
"treasury": treasuryObjectId,
"mcms": mcmsAddress,
"mcms_owner": mcmsOwnerAddress,
})
if err != nil {
return nil, nil, err
}

packageId, tx, err := bind.PublishPackage(ctx, opts, client, bind.PublishRequest{
CompiledModules: artifact.Modules,
Dependencies: artifact.Dependencies,
})
if err != nil {
return nil, nil, err
}

contract, err := NewCCIPUSDCTokenPool(packageId, client)
if err != nil {
return nil, nil, err
}

return contract, tx, nil
}
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ public fun apply_allowlist_updates<T>(
}

// ================================================================
// | Burn/Mint |
// | Lock/Release |
// ================================================================

public struct TypeProof has drop {}
Expand Down
2 changes: 1 addition & 1 deletion contracts/ccip/ccip_token_pools/token_pool/Move.lock
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ dependencies = [
]

[move.toolchain-version]
compiler-version = "1.54.1"
compiler-version = "1.55.0"
edition = "2024"
flavor = "sui"

Expand Down
12 changes: 6 additions & 6 deletions contracts/ccip/ccip_token_pools/usdc_token_pool/Move.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[move]
version = 3
manifest_digest = "669F3ACC63A42576A333870BA7792FD60B5BB1FAB356C76C52FFF5146F2663BF"
manifest_digest = "C76DD278314FF86495A48BE1F4FAEFF047E2F74F164BF4D62B863535EEEB82C8"
deps_digest = "CAFAD8A7CF51067FB4358215BECB86BD100DD64E57C2AC8A7AE7D74B688F5965"
dependencies = [
{ id = "Bridge", name = "Bridge" },
Expand All @@ -16,7 +16,7 @@ dependencies = [

[[move.package]]
id = "Bridge"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "209f0da8e316", subdir = "crates/sui-framework/packages/bridge" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "2cde80b5766b0bc2073908e10f6e3c81c93fd691", subdir = "crates/sui-framework/packages/bridge" }

dependencies = [
{ id = "MoveStdlib", name = "MoveStdlib" },
Expand Down Expand Up @@ -73,19 +73,19 @@ dependencies = [

[[move.package]]
id = "MoveStdlib"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "209f0da8e316", subdir = "crates/sui-framework/packages/move-stdlib" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "2cde80b5766b0bc2073908e10f6e3c81c93fd691", subdir = "crates/sui-framework/packages/move-stdlib" }

[[move.package]]
id = "Sui"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "209f0da8e316", subdir = "crates/sui-framework/packages/sui-framework" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "2cde80b5766b0bc2073908e10f6e3c81c93fd691", subdir = "crates/sui-framework/packages/sui-framework" }

dependencies = [
{ id = "MoveStdlib", name = "MoveStdlib" },
]

[[move.package]]
id = "SuiSystem"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "209f0da8e316", subdir = "crates/sui-framework/packages/sui-system" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "2cde80b5766b0bc2073908e10f6e3c81c93fd691", subdir = "crates/sui-framework/packages/sui-system" }

dependencies = [
{ id = "MoveStdlib", name = "MoveStdlib" },
Expand Down Expand Up @@ -130,6 +130,6 @@ dependencies = [
]

[move.toolchain-version]
compiler-version = "1.54.1"
compiler-version = "1.55.0"
edition = "2024"
flavor = "sui"
10 changes: 8 additions & 2 deletions contracts/ccip/ccip_token_pools/usdc_token_pool/Move.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,24 @@ TokenMessengerMinter = { local = "../../../vendored/circlefin/sui-cctp/packages/
ccip = "_"
ccip_token_pool = "_"
usdc_token_pool = "_"
usdc_local_token = "_"
usdc_coin_metadata_object_id = "_"
token_messenger_minter = "_"
token_messenger_minter_state = "_"
message_transmitter = "_"
message_transmitter_state = "_"
treasury = "_"
mcms = "_"
mcms_owner = "_"

[dev-addresses]
ccip = "0x1000"
ccip_token_pool = "0x2000"
usdc_token_pool = "0x2003"
usdc_local_token = "0x9000"
usdc_coin_metadata_object_id = "0x9000"
token_messenger_minter = "0x31cc14d80c175ae39777c0238f20594c6d4869cfab199f40b69f3319956b8beb"
token_messenger_minter_state = "0x5252abd1137094ed1db3e0d75bc36abcd287aee4bc310f8e047727ef5682e7c2"
message_transmitter = "0x4931e06dce648b3931f890035bd196920770e913e43e45990b383f6486fdd0a5"
message_transmitter_state = "0x98234bd0fa9ac12cc0a20a144a22e36d6a32f7e0a97baaeaf9c76cdc6d122d2e"
treasury = "0x7170137d4a6431bf83351ac025baf462909bffe2877d87716374fb42b9629ebe"
mcms = "0x4000"
mcms_owner = "0x4010"
Loading
Loading