Skip to content

Aptos CCIP e2e tests #17743

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

Draft
wants to merge 155 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
155 commits
Select commit Hold shift + click to select a range
35203c5
core/capabilities/ccip/ccipaptos: add initial ccipaptos implementation
cfal Feb 26, 2025
eec2ee6
core/capabilities/ccip/common/addresscodec.go: add aptos address codec
cfal Feb 26, 2025
c682b39
core/capabilities/ccip/delegate.go: initialize with aptos address codec
cfal Feb 26, 2025
adc9b99
core/capabilities/ccip/ccipevm/executecodec_test.go: initialize extra…
cfal Feb 26, 2025
ede855b
core/capabilities/ccip/common/extradatacodec.go: add Aptos
cfal Feb 26, 2025
060b1c2
core/capabilities/ccip/oraclecreator/plugin.go: initialize extra data…
cfal Feb 26, 2025
56abcad
core/capabilities/ccip/ccipevm/msghasher_test.go: initialize extra da…
cfal Feb 26, 2025
51a4138
.changeset/warm-toys-give.md: add changeset
cfal Feb 27, 2025
8c15dfc
core/capabilities/ccip/ccipaptos: update for contract changes, dont d…
cfal Apr 15, 2025
0579485
core/capabilities/ccip/configs/aptos: add ccip CW/CR configs
cfal Apr 17, 2025
ee7a33b
core/services/keystore/keys/ocr2key/aptos_keyring.go: implement Sign3…
cfal Apr 17, 2025
ced4247
core/capabilities/ccip/ocrimpls/config_tracker.go: dont use address c…
cfal Apr 17, 2025
f608660
core/capabilities/ccip/ocrimpls/contract_transmitter.go: support ed25…
cfal Apr 17, 2025
d110210
core/capabilities/ccip/ocrimpls/aptos_contract_transmitter_factory.go…
cfal Apr 17, 2025
13452b9
core/capabilities/ccip/oraclecreator/plugin.go: support Aptos
cfal Apr 17, 2025
7b67407
core/capabilities/ccip/oraclecreator/plugin.go: refactor into createC…
cfal Apr 17, 2025
92f0180
core/capabilities/ccip/ocrimpls/svm_contract_transmitter_factory.go: …
cfal Apr 17, 2025
c6b9f82
core/capabilities/ccip/ccipaptos: update chainlink-integrations refs
cfal Apr 22, 2025
db0837a
core/capabilities/ccip/configs/aptos/contract_reader.go: add CCIPMess…
cfal Apr 30, 2025
2403232
core/capabilities/ccip/configs/aptos/contract_reader.go: add get_dest…
cfal Apr 30, 2025
942ff31
add and update aptos-go-sdk and chainlink-aptos
cfal Apr 30, 2025
d763ba2
Upading aptos plugin ref
sdrug Apr 23, 2025
03e079f
Adjusting aptos plugin ref to point to the chainlink-aptos as a whole
sdrug Apr 23, 2025
dfe1056
Fixing merge conflict resolution (logger-related)
sdrug Apr 30, 2025
0b392b0
feat: Move and refactor changesets
rodrigombsoares Mar 24, 2025
12da651
feat: migrate to operations api | lane deployment cs
rodrigombsoares Apr 10, 2025
dcb7f8f
refactor: deploy chain with a single proposal
rodrigombsoares Apr 13, 2025
5a120ed
feat: Deploy Aptos Lanes cs working
rodrigombsoares Apr 13, 2025
0f20541
rebase and solve conflicts
rodrigombsoares May 1, 2025
458c241
Add OnRamp config
friedemannf May 1, 2025
6e3c30a
Fix NewExtraDataCodecParams
friedemannf May 1, 2025
ec56a62
Merge remote-tracking branch 'origin/develop' into ccip-aptos-codec
friedemannf May 1, 2025
be14b2c
Fix NewExtraDataCodecParams
friedemannf May 1, 2025
e047945
bump chainlink-aptos to latest
friedemannf May 1, 2025
f50c562
Merge remote-tracking branch 'origin/develop' into ccip-aptos-codec
friedemannf May 1, 2025
a85066f
Upgrade private plugin refs
friedemannf May 1, 2025
0ee2541
Generate
friedemannf May 1, 2025
a3a1fa5
feat: Implement contract update changesets
rodrigombsoares May 1, 2025
7d688bd
ref: refactor MCMS deploy sequence
rodrigombsoares May 1, 2025
0578546
Merge remote-tracking branch 'origin/develop' into ccip-aptos-codec
friedemannf May 1, 2025
8a6b502
Bump chainlink-aptos
friedemannf May 1, 2025
4d6f882
Bumping up chainlink-aptos plugin gitRef
sdrug May 1, 2025
56cf9a6
ref: apply standards
rodrigombsoares May 1, 2025
47bf2f5
Fix logger
friedemannf May 2, 2025
7368b84
Merge remote-tracking branch 'origin/develop' into ccip-aptos-codec
friedemannf May 2, 2025
2f623f1
Merge remote-tracking branch 'origin/ccip-aptos-codec' into ccip-apto…
friedemannf May 2, 2025
dc5baa4
Add field renames to CCIPMessageSent event
friedemannf May 2, 2025
c09e1db
Temp chainlink-aptos version
sdrug May 2, 2025
a34cca4
Fixing CCIPMessageSent event renamings
sdrug May 2, 2025
d03fa92
Fixing plugin build
sdrug May 2, 2025
a69aee3
Merge remote-tracking branch 'origin/aptos-move-changesets' into ccip…
friedemannf May 5, 2025
29eddf9
Move save to changeset level
rodrigombsoares May 6, 2025
d13dfa3
ref: rename operations
rodrigombsoares May 6, 2025
6e13f37
Merge remote-tracking branch 'refs/remotes/origin/aptos-move-changese…
friedemannf May 6, 2025
7800b82
feat: router configs on add lane
rodrigombsoares May 6, 2025
0b69104
feat: feequoter token transfer fee configs operation
rodrigombsoares May 6, 2025
544bc1d
Merge remote-tracking branch 'refs/remotes/origin/aptos-move-changese…
friedemannf May 7, 2025
8fd8898
feat(aptos): Add CCIP deployment changeset
rodrigombsoares May 7, 2025
e1b4eda
feat: set timelock delay
rodrigombsoares May 7, 2025
86e4e4c
fix: review comments | fix lint
rodrigombsoares May 8, 2025
8a1f1c9
fix: go mod tidy
rodrigombsoares May 8, 2025
a2a3f3a
core/capabilities/ccip/ccipaptos: add initial ccipaptos implementation
cfal Feb 26, 2025
eb2c48f
core/capabilities/ccip/common/addresscodec.go: add aptos address codec
cfal Feb 26, 2025
041426b
core/capabilities/ccip/delegate.go: initialize with aptos address codec
cfal Feb 26, 2025
b7a752c
core/capabilities/ccip/ccipevm/executecodec_test.go: initialize extra…
cfal Feb 26, 2025
5f6fc4c
core/capabilities/ccip/common/extradatacodec.go: add Aptos
cfal Feb 26, 2025
8714c10
core/capabilities/ccip/oraclecreator/plugin.go: initialize extra data…
cfal Feb 26, 2025
bfadb8b
core/capabilities/ccip/ccipevm/msghasher_test.go: initialize extra da…
cfal Feb 26, 2025
0b92aa2
.changeset/warm-toys-give.md: add changeset
cfal Feb 27, 2025
369558e
core/capabilities/ccip/ccipaptos: update for contract changes, dont d…
cfal Apr 15, 2025
2189dda
core/capabilities/ccip/configs/aptos: add ccip CW/CR configs
cfal Apr 17, 2025
a8ea6e6
core/services/keystore/keys/ocr2key/aptos_keyring.go: implement Sign3…
cfal Apr 17, 2025
af6cf87
core/capabilities/ccip/ocrimpls/config_tracker.go: dont use address c…
cfal Apr 17, 2025
46f8bc4
core/capabilities/ccip/ocrimpls/contract_transmitter.go: support ed25…
cfal Apr 17, 2025
abd7c9d
core/capabilities/ccip/ocrimpls/aptos_contract_transmitter_factory.go…
cfal Apr 17, 2025
41872b4
core/capabilities/ccip/oraclecreator/plugin.go: support Aptos
cfal Apr 17, 2025
6d0043b
core/capabilities/ccip/oraclecreator/plugin.go: refactor into createC…
cfal Apr 17, 2025
40709a4
core/capabilities/ccip/ocrimpls/svm_contract_transmitter_factory.go: …
cfal Apr 17, 2025
5bb5d43
core/capabilities/ccip/ccipaptos: update chainlink-integrations refs
cfal Apr 22, 2025
241f2a5
core/capabilities/ccip/configs/aptos/contract_reader.go: add CCIPMess…
cfal Apr 30, 2025
5972342
core/capabilities/ccip/configs/aptos/contract_reader.go: add get_dest…
cfal Apr 30, 2025
5b37055
Upading aptos plugin ref
sdrug Apr 23, 2025
daf6c20
Adjusting aptos plugin ref to point to the chainlink-aptos as a whole
sdrug Apr 23, 2025
c872761
Fixing merge conflict resolution (logger-related)
sdrug Apr 30, 2025
dcb5d79
Add OnRamp config
friedemannf May 1, 2025
e2e028b
Fix NewExtraDataCodecParams
friedemannf May 1, 2025
8eafaff
Fix NewExtraDataCodecParams
friedemannf May 1, 2025
7199d84
Generate
friedemannf May 1, 2025
c3fecff
Fix logger
friedemannf May 2, 2025
bc71941
Bumping up chainlink-aptos plugin gitRef
sdrug May 1, 2025
8deb723
Add field renames to CCIPMessageSent event
friedemannf May 2, 2025
6d5c55c
Temp chainlink-aptos version
sdrug May 2, 2025
d7cfec9
Fixing CCIPMessageSent event renamings
sdrug May 2, 2025
748a93e
Fixing plugin build
sdrug May 2, 2025
aa20978
add and update chainlink-aptos and aptos-go-sdk
cfal May 12, 2025
e23fbdf
Merge remote-tracking branch 'origin/ccip-aptos-codec' into ccip-apto…
friedemannf May 12, 2025
603ae24
feat: install aptos CLI for ccip unit tests
erikburt May 14, 2025
76c8c2d
fix: fix unit tests
rodrigombsoares May 14, 2025
8a5c82d
Merge branch 'develop' into aptos-deploy-ccip-cs
rodrigombsoares May 14, 2025
2f4cb72
fix: breaking changes
rodrigombsoares May 14, 2025
517bda3
fix: setup aptos for flakeguard
erikburt May 14, 2025
37580b7
Add Aptos e2e messaging test
friedemannf May 15, 2025
e08ee6f
Merge ccip-aptos-codec into aptos-ccip-e2e-tests
friedemannf May 15, 2025
1450cd0
Merge remote-tracking branch 'origin/aptos-deploy-ccip-cs' into aptos…
friedemannf May 15, 2025
522c51c
Merge remote-tracking branch 'origin/develop' into aptos-ccip-e2e-tests
friedemannf May 15, 2025
dd98577
Merge branch 'develop' into aptos-deploy-ccip-cs
rodrigombsoares May 15, 2025
b8c017a
Fix
friedemannf May 15, 2025
12f2e43
Merge remote-tracking branch 'origin/develop' into aptos-ccip-e2e-tests
friedemannf May 15, 2025
caf2122
Merge remote-tracking branch 'origin/aptos-deploy-ccip-cs' into aptos…
friedemannf May 15, 2025
214ad6e
Install Aptos CLI and LOOP plugins
friedemannf May 15, 2025
f2de07f
Merge remote-tracking branch 'origin/develop' into aptos-ccip-e2e-tests
friedemannf May 15, 2025
1d9e03a
Update CI
friedemannf May 15, 2025
c3590b2
Upgrade run-e2e-tests workflow
friedemannf May 15, 2025
5968eb4
Upgrade run-e2e-tests workflow
friedemannf May 16, 2025
aab5c38
Upgrade run-e2e-tests workflow
friedemannf May 16, 2025
36a3b03
core/capabilities/ccip/ccipaptos: add initial ccipaptos implementation
cfal Feb 26, 2025
bb42569
core/capabilities/ccip/common/addresscodec.go: add aptos address codec
cfal Feb 26, 2025
d4ef879
core/capabilities/ccip/oraclecreator/plugin.go: initialize extra data…
cfal Feb 26, 2025
c891f0e
core/capabilities/ccip/ccipevm/msghasher_test.go: initialize extra da…
cfal Feb 26, 2025
97e5dd3
.changeset/warm-toys-give.md: add changeset
cfal Feb 27, 2025
a0e5dd0
core/capabilities/ccip/ccipaptos: update for contract changes, dont d…
cfal Apr 15, 2025
9525feb
core/capabilities/ccip/configs/aptos: add ccip CW/CR configs
cfal Apr 17, 2025
9e2f502
core/services/keystore/keys/ocr2key/aptos_keyring.go: implement Sign3…
cfal Apr 17, 2025
20c0b0a
core/capabilities/ccip/ocrimpls/config_tracker.go: dont use address c…
cfal Apr 17, 2025
5c189ad
core/capabilities/ccip/ocrimpls/contract_transmitter.go: support ed25…
cfal Apr 17, 2025
4b42abb
core/capabilities/ccip/ocrimpls/aptos_contract_transmitter_factory.go…
cfal Apr 17, 2025
e3749d2
core/capabilities/ccip/oraclecreator/plugin.go: support Aptos
cfal Apr 17, 2025
9c286d9
core/capabilities/ccip/ccipaptos: update chainlink-integrations refs
cfal Apr 22, 2025
8b89094
core/capabilities/ccip/configs/aptos/contract_reader.go: add CCIPMess…
cfal Apr 30, 2025
8eabba1
core/capabilities/ccip/configs/aptos/contract_reader.go: add get_dest…
cfal Apr 30, 2025
a78f1cf
Upading aptos plugin ref
sdrug Apr 23, 2025
f4ca06d
Adjusting aptos plugin ref to point to the chainlink-aptos as a whole
sdrug Apr 23, 2025
e31abb3
Fixing merge conflict resolution (logger-related)
sdrug Apr 30, 2025
f9cee8b
Add OnRamp config
friedemannf May 1, 2025
2dc1e8c
Fix NewExtraDataCodecParams
friedemannf May 1, 2025
71ff7cb
Generate
friedemannf May 1, 2025
d239f28
Fix logger
friedemannf May 2, 2025
c2dfd73
Bumping up chainlink-aptos plugin gitRef
sdrug May 1, 2025
ff23bc1
Add field renames to CCIPMessageSent event
friedemannf May 2, 2025
effa0cb
Temp chainlink-aptos version
sdrug May 2, 2025
3012a5d
Fixing CCIPMessageSent event renamings
sdrug May 2, 2025
1baa3d5
Fixing plugin build
sdrug May 2, 2025
ad9a640
TokenAmount field of CCIPMessageSent renaming CR config
sdrug May 13, 2025
b7f293c
core/capabilities/ccip: resolve issues from develop branch refactors
cfal May 15, 2025
3104873
add and update chainlink-aptos and aptos-go-sdk
cfal May 21, 2025
4b7e272
Bumping up the chainlink-aptos version
sdrug May 21, 2025
577cffe
Adding EventFilter config to CCIPMessageSent
sdrug May 21, 2025
00ca917
Fix msghasher append
friedemannf May 21, 2025
85e86c7
Resolving conflicts with develop, aptos plugin is public now
sdrug May 21, 2025
201e6cc
Add Aptos2EVM support
friedemannf May 22, 2025
b8af628
Merge remote-tracking branch 'origin/ccip-aptos-codec' into aptos-cci…
friedemannf May 22, 2025
4c8070b
Update action
friedemannf May 22, 2025
f9742e9
gomodtidy
friedemannf May 22, 2025
b957364
Update Aptos LOOP plugin
friedemannf May 22, 2025
a9f6cf1
Merge remote-tracking branch 'origin/develop' into aptos-ccip-e2e-tests
friedemannf May 22, 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
6 changes: 6 additions & 0 deletions .changeset/warm-toys-give.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"chainlink": patch
---

add support for Aptos CCIP #added

9 changes: 9 additions & 0 deletions .github/actions/setup-aptos/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Setup Aptos CLI
description: Setup Aptos CLI
runs:
using: composite
steps:
- name: Install Aptos CLI
uses: aptos-labs/actions/install-aptos-cli@ce57287eb852b9819c1d74fecc3be187677559fd # v0.1
with:
CLI_VERSION: 7.2.0
13 changes: 13 additions & 0 deletions .github/integration-in-memory-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -297,4 +297,17 @@ runner-test-matrix:
test_cmd: cd smoke/ccip/ && go test ccip_disable_lane_test.go -timeout 10m -test.parallel=1 -count=1 -json
test_go_project_path: integration-tests

# Aptos tests
- id: smoke/ccip/ccip_aptos_messaging_test.go:*
path: integration-tests/smoke/ccip/ccip_aptos_messaging_test.go
test_env_type: in-memory
runs_on: ubuntu-latest
triggers:
- PR Integration CCIP Tests
- Nightly Integration CCIP Tests
test_cmd: cd smoke/ccip && go test ccip_aptos_messaging_test.go -timeout 15m -test.parallel=1 -count=1 -json
test_go_project_path: integration-tests
aptos_cli: 7.2.0
install_plugins_public: true

# END: CCIP tests
4 changes: 2 additions & 2 deletions .github/workflows/integration-in-memory-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
contents: read
needs: changes
if: github.event_name == 'pull_request' && ( needs.changes.outputs.ccip_changes == 'true' || needs.changes.outputs.core_changes == 'true' || needs.changes.outputs.github_ci_changes == 'true')
uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@608298f511acfbcfd1099e5907ba1b1b0dda8b14
uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@50a6cb250423d2a1d8edfd8e42c53f63135043e0
with:
workflow_name: Run CCIP Integration Tests For PR
chainlink_version: ${{ inputs.cl_ref || github.sha }}
Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:
contents: read
needs: changes
if: github.event_name == 'merge_group' && ( needs.changes.outputs.ccip_changes == 'true' || needs.changes.outputs.core_changes == 'true' || needs.changes.outputs.github_ci_changes == 'true')
uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@608298f511acfbcfd1099e5907ba1b1b0dda8b14
uses: smartcontractkit/.github/.github/workflows/run-e2e-tests.yml@50a6cb250423d2a1d8edfd8e42c53f63135043e0
with:
workflow_name: Run CCIP Integration Tests For Merge Queue
chainlink_version: ${{ inputs.cl_ref || github.sha }}
Expand Down
67 changes: 67 additions & 0 deletions core/capabilities/ccip/ccipaptos/addresscodec.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
package ccipaptos

import (
"encoding/hex"
"fmt"
"strings"
)

type AddressCodec struct{}

func (a AddressCodec) AddressBytesToString(addr []byte) (string, error) {
return addressBytesToString(addr)
}

func (a AddressCodec) AddressStringToBytes(addr string) ([]byte, error) {
return addressStringToBytes(addr)
}

func addressBytesToString(addr []byte) (string, error) {
if len(addr) < 1 || len(addr) > 32 {
return "", fmt.Errorf("invalid Aptos address length (%d)", len(addr))
}

return fmt.Sprintf("0x%064x", addr), nil
}

func addressStringToBytes(addr string) ([]byte, error) {
a := strings.TrimPrefix(addr, "0x")
if len(a) == 0 {
return nil, fmt.Errorf("invalid Aptos address length, expected at least 1 character: %s", addr)
}
if len(a) > 64 {
return nil, fmt.Errorf("invalid Aptos address length, expected at most 64 characters: %s", addr)
}
for len(a) < 64 {
a = "0" + a
}

bytes, err := hex.DecodeString(a)
if err != nil {
return nil, fmt.Errorf("failed to decode Aptos address '%s': %w", addr, err)
}
return bytes, nil
}

func addressBytesToBytes32(addr []byte) ([32]byte, error) {
if len(addr) > 32 {
return [32]byte{}, fmt.Errorf("invalid Aptos address length, expected 32, got %d", len(addr))
}
var result [32]byte
// Left pad by copying to the end of the 32 byte array
copy(result[32-len(addr):], addr)
return result, nil
}

func addressStringToBytes32(addr string) ([32]byte, error) {
bytes, err := addressStringToBytes(addr)
if err != nil {
return [32]byte{}, err
}
return addressBytesToBytes32(bytes)
}

func addressIsValid(addr string) bool {
_, err := addressStringToBytes(addr)
return err == nil
}
121 changes: 121 additions & 0 deletions core/capabilities/ccip/ccipaptos/addresscodec_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
package ccipaptos

import (
"crypto/rand"
"encoding/hex"
"errors"
"fmt"
"testing"

"github.com/stretchr/testify/require"
)

func generateAddressBytes32() [32]byte {
var result [32]byte
_, err := rand.Read(result[:])
if err != nil {
panic(fmt.Sprintf("failed to generate random address bytes: %v", err))
}
return result
}

func generateAddressBytes() []byte {
a := generateAddressBytes32()
return a[:]
}

func generateAddressString() string {
addressBytes := generateAddressBytes()
addressString, err := addressBytesToString(addressBytes)
if err != nil {
panic(fmt.Sprintf("failed to generate random address string: %v", err))
}
return addressString
}

func TestAddressBytesToString(t *testing.T) {
tests := []struct {
name string
inHex string
isErr bool
expected string
}{
{
"empty",
"",
true,
"",
},
{
"equal to 32 bytes",
"0102030405060102030405060102030405060102030405060102030405060101",
false,
"0x0102030405060102030405060102030405060102030405060102030405060101",
},
{
"longer than required",
"0102030405060102030405060102030405060102030405060102030405060101FFFFFFFFFF",
true,
"",
},
}

codec := AddressCodec{}
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
bytes, err := hex.DecodeString(test.inHex)
require.NoError(t, err)

if test.isErr {
_, err := codec.AddressBytesToString(bytes)
require.Error(t, err, fmt.Sprintf("expected error for %s, input %s", test.name, test.inHex))
} else {
actual, err := codec.AddressBytesToString(bytes)
require.NoError(t, err)
require.Equal(t, test.expected, actual)
}
})
}
}

func TestAddressStringToBytes(t *testing.T) {
tests := []struct {
name string
in string
expected []byte
expectedErr error
}{
{
"hand crafted",
"0x0102030405060102030405060102030405060102030405060102030405060101",
[]byte{
0x01, 0x02, 0x03, 0x04, 0x05, 0x06,
0x01, 0x02, 0x03, 0x04, 0x05, 0x06,
0x01, 0x02, 0x03, 0x04, 0x05, 0x06,
0x01, 0x02, 0x03, 0x04, 0x05, 0x06,
0x01, 0x02, 0x03, 0x04, 0x05, 0x06,
0x01, 0x01,
},
nil,
},
{
"hand crafted error",
"invalidAddress",
nil,
errors.New("failed to decode Aptos address 'invalidAddress': invalid address"),
},
}

codec := AddressCodec{}
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
actual, err := codec.AddressStringToBytes(test.in)
if test.expectedErr == nil {
require.NoError(t, err)
require.Equal(t, test.expected, actual)
} else {
require.Error(t, err)
}
})
}
}
Loading
Loading