Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
dbc52a1
Dynamic dispatch support for CCIP Receiver contracts
JohnChangUK Oct 13, 2025
8d54805
Update bindings
JohnChangUK Oct 13, 2025
3e3adb1
Merge branch 'develop' into dynamic-dispatch-support
JohnChangUK Oct 13, 2025
d5d5d69
Fmt
JohnChangUK Oct 13, 2025
7fb78d7
Merge branch 'develop' into dynamic-dispatch-support
JohnChangUK Oct 26, 2025
11d1792
Use Function closures for token pool lock/burn release/mint hooks
JohnChangUK Oct 26, 2025
95f8d0c
Merge branch 'develop' into function-closures
JohnChangUK Nov 24, 2025
bda62d6
Merge branch 'develop' into function-closures
JohnChangUK Nov 24, 2025
5e02abf
Update CCIP to handle v1 and v2 ccip receiver registration dispatch
JohnChangUK Nov 25, 2025
b81e6ce
Update tests and pool modules to handle v1 and v2 ccip receive callba…
JohnChangUK Nov 25, 2025
51229cf
Update tests and pool modules to handle v1 and v2 ccip receive callba…
JohnChangUK Nov 28, 2025
8f247b3
Refactor lock_or_burn_v2 return values
JohnChangUK Nov 28, 2025
55d730f
Add V1 V2 Compatibility tests using function closures
JohnChangUK Nov 28, 2025
78e003f
Merge branch 'develop' into function-closures
JohnChangUK Nov 28, 2025
8792318
Formatting move files
JohnChangUK Nov 28, 2025
78b6d00
Multiple token transfer test
JohnChangUK Nov 28, 2025
6dfbe56
Remove duplicate onramp call check, slight refactor
JohnChangUK Nov 29, 2025
c25af36
Clean up register pool, refactor
JohnChangUK Dec 10, 2025
694e30a
Add PTT CCIP Receiver
JohnChangUK Dec 10, 2025
a103894
Remove `_proof` in V2 CCIP Receiver registry
JohnChangUK Dec 10, 2025
6573a4c
Add missing deployer address in ccip dummy receiver bindings
JohnChangUK Dec 10, 2025
3b00f76
PTT receiver to be consistent with dummy receiver
JohnChangUK Dec 11, 2025
139193f
Remove proof from pool registration.
JohnChangUK Dec 11, 2025
0c21ac5
receiver_registered_v2_events rename
JohnChangUK Dec 12, 2025
0c8c4c8
Add persistent callbacks
JohnChangUK Jan 29, 2026
61aa64c
Add documentation, refactor on chain code
JohnChangUK Feb 7, 2026
5ea2dbe
Merge branch 'develop' into function-closures
JohnChangUK Feb 7, 2026
0be6807
move fmt
JohnChangUK Feb 7, 2026
4ae0694
Add publisher check register_v2_callbacks in token pools
JohnChangUK Feb 10, 2026
c82eba5
Change numbers to constants - test receiver
JohnChangUK Feb 11, 2026
ad9199a
Merge branch 'develop' into function-closures
JohnChangUK Feb 17, 2026
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
42 changes: 42 additions & 0 deletions bindings/ccip/receiver_registry/receiver_registry.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

72 changes: 72 additions & 0 deletions bindings/ccip/token_admin_registry/token_admin_registry.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

53 changes: 49 additions & 4 deletions bindings/ccip_dummy_receiver/ccip_dummy_receiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (

"github.com/smartcontractkit/chainlink-aptos/bindings/bind"
module_dummy_receiver "github.com/smartcontractkit/chainlink-aptos/bindings/ccip_dummy_receiver/dummy_receiver"
module_ptt_dummy_receiver "github.com/smartcontractkit/chainlink-aptos/bindings/ccip_dummy_receiver/ptt_dummy_receiver"
"github.com/smartcontractkit/chainlink-aptos/bindings/compile"
"github.com/smartcontractkit/chainlink-aptos/contracts"
)
Expand All @@ -14,14 +15,16 @@ type CCIPDummyReceiver interface {
Address() aptos.AccountAddress

DummyReceiver() module_dummy_receiver.DummyReceiverInterface
PTTDummyReceiver() module_ptt_dummy_receiver.PttDummyReceiverInterface
}

var _ CCIPDummyReceiver = CCIPDummyReceiverContract{}

type CCIPDummyReceiverContract struct {
address aptos.AccountAddress

dummyReceiver module_dummy_receiver.DummyReceiverInterface
dummyReceiver module_dummy_receiver.DummyReceiverInterface
pttDummyReceiver module_ptt_dummy_receiver.PttDummyReceiverInterface
}

func (C CCIPDummyReceiverContract) Address() aptos.AccountAddress {
Expand All @@ -32,30 +35,44 @@ func (C CCIPDummyReceiverContract) DummyReceiver() module_dummy_receiver.DummyRe
return C.dummyReceiver
}

func (C CCIPDummyReceiverContract) PTTDummyReceiver() module_ptt_dummy_receiver.PttDummyReceiverInterface {
return C.pttDummyReceiver
}

var FunctionInfo = bind.MustParseFunctionInfo(
module_dummy_receiver.FunctionInfo,
module_ptt_dummy_receiver.FunctionInfo,
)

func Compile(address aptos.AccountAddress, ccipAddress aptos.AccountAddress, mcmsAddress aptos.AccountAddress) (compile.CompiledPackage, error) {
func Compile(address aptos.AccountAddress, ccipAddress aptos.AccountAddress, mcmsAddress aptos.AccountAddress, deployer aptos.AccountAddress) (compile.CompiledPackage, error) {
namedAddresses := map[string]aptos.AccountAddress{
"ccip_dummy_receiver": address,
"ccip": ccipAddress,
"mcms": mcmsAddress,
"mcms_register_entrypoints": aptos.AccountZero,
"deployer": deployer,
}
// Compile using CLI
return compile.CompilePackage(contracts.CCIPDummyReceiver, namedAddresses)
}

func Bind(address aptos.AccountAddress, client aptos.AptosRpcClient) CCIPDummyReceiver {
return CCIPDummyReceiverContract{
address: address,
dummyReceiver: module_dummy_receiver.NewDummyReceiver(address, client),
address: address,
dummyReceiver: module_dummy_receiver.NewDummyReceiver(address, client),
pttDummyReceiver: module_ptt_dummy_receiver.NewPttDummyReceiver(address, client),
}
}

const (
DefaultSeed = "chainlink_ccip_dummy_receiver"
)

// DeployToObject deploys the dummmy receiver contract to a new named object.
// The resulting address will be calculated using the deployer's account address and the next sequence number
//
// NOTE: This deployment method will NOT work with ptt_dummy_receiver module as it requires resource account.
// Use DeployToResourceAccount if you need PTT functionality.
func DeployToObject(
auth aptos.TransactionSigner,
client aptos.AptosRpcClient,
Expand All @@ -66,10 +83,38 @@ func DeployToObject(
"ccip": ccipAddress,
"mcms": mcmsAddress,
"mcms_register_entrypoints": aptos.AccountZero,
"deployer": auth.AccountAddress(), // Required for compilation, but ptt_dummy_receiver won't work with object deployment
}
address, tx, err := bind.DeployPackageToObject(auth, client, contracts.CCIPDummyReceiver, namedAddresses)
if err != nil {
return aptos.AccountAddress{}, nil, nil, err
}
return address, tx, Bind(address, client), nil
}

// DeployToResourceAccount deploys the dummy receiver contract to a new resource account.
// The address of that resource account is determined by the deployer account + an optional seed.
// If no seed is provided, the default seed DefaultSeed is used.
func DeployToResourceAccount(
auth aptos.TransactionSigner,
client aptos.AptosRpcClient,
ccipAddress,
mcmsAddress aptos.AccountAddress,
seed ...string,
) (aptos.AccountAddress, *api.PendingTransaction, CCIPDummyReceiver, error) {
dummyReceiverSeed := DefaultSeed
if len(seed) > 0 {
dummyReceiverSeed = seed[0]
}
namedAddresses := map[string]aptos.AccountAddress{
"ccip": ccipAddress,
"mcms": mcmsAddress,
"mcms_register_entrypoints": aptos.AccountZero,
"deployer": auth.AccountAddress(), // Origin account where Container is stored
}
address, tx, err := bind.DeployPackageToResourceAccount(auth, client, contracts.CCIPDummyReceiver, dummyReceiverSeed, namedAddresses)
if err != nil {
return aptos.AccountAddress{}, nil, nil, err
}
return address, tx, Bind(address, client), nil
}
2 changes: 1 addition & 1 deletion bindings/ccip_dummy_receiver/ccip_dummy_receiver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

func TestCompile(t *testing.T) {
t.Parallel()
output, err := Compile(aptos.AccountOne, aptos.AccountOne, aptos.AccountThree)
output, err := Compile(aptos.AccountOne, aptos.AccountOne, aptos.AccountThree, aptos.AccountFour)
require.NoError(t, err)
require.NotZero(t, output.Metadata, "Compilation resulted in no metadata")
require.NotZero(t, output.Bytecode, "Compilation resulted in no bytecode")
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading