Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions .changeset/twelve-socks-drop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#added Sui keystore and relayer plugin basic integration
29 changes: 29 additions & 0 deletions .github/actions/setup-sui/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Setup Sui CLI
description: Install and cache Sui CLI using suiup
inputs:
version:
description: Sui CLI version to install (e.g., mainnet-v1.57.2)
required: false
default: mainnet-v1.57.2

runs:
using: composite
steps:
- uses: actions/cache@v4
id: cache
name: Cache Sui CLI
with:
path: |
~/.suiup/bin
key: ${{ runner.os }}-suiup-${{ inputs.version }}

- if: ${{ steps.cache.outputs.cache-hit != 'true' }}
name: Install suiup and Sui CLI
shell: bash
run: |
curl -sSfL https://raw.githubusercontent.com/MystenLabs/suiup/main/install.sh | sh
"$HOME/.local/bin/suiup" install sui@${{ inputs.version }} --yes

- name: Export Sui CLI to PATH
shell: bash
run: echo "PATH=$HOME/.suiup/bin:$HOME/.local/bin:$PATH" >> $GITHUB_ENV
169 changes: 169 additions & 0 deletions .github/integration-in-memory-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,126 @@ runner-test-matrix:
aptos_cli_version: 7.8.1
install_plugins_public: true

# # TON tests
# - id: smoke/ccip/ccip_ton_messaging_test.go:*
# path: integration-tests/smoke/ccip/ccip_ton_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_ton_messaging_test.go -timeout 20m -test.parallel=1 -count=1 -json
# test_go_project_path: integration-tests

- id: smoke/ccip/ccip_aptos_token_transfer_test.go:Test_CCIP_TokenTransfer_BnM_Aptos2EVM
path: integration-tests/smoke/ccip/ccip_aptos_token_transfer_test.go
test_env_type: in-memory
runs_on: ubuntu-latest
triggers:
- PR Integration CCIP Tests
- Nightly Integration CCIP Tests
test_cmd: go test ./smoke/ccip -run "Test_CCIP_TokenTransfer_BnM_Aptos2EVM" -timeout 20m -test.parallel=1 -count=1 -json
test_go_project_path: integration-tests
aptos_cli_version: 7.8.1
install_plugins_public: true

- id: smoke/ccip/ccip_aptos_token_transfer_test.go:Test_CCIP_TokenTransfer_BnM_EVM2Aptos
path: integration-tests/smoke/ccip/ccip_aptos_token_transfer_test.go
test_env_type: in-memory
runs_on: ubuntu-latest
triggers:
- PR Integration CCIP Tests
- Nightly Integration CCIP Tests
test_cmd: go test ./smoke/ccip -run "Test_CCIP_TokenTransfer_BnM_EVM2Aptos" -timeout 20m -test.parallel=1 -count=1 -json
test_go_project_path: integration-tests
aptos_cli_version: 7.8.1
install_plugins_public: true

- id: smoke/ccip/ccip_aptos_token_transfer_test.go:Test_CCIP_TokenTransfer_LnR_Aptos2EVM
path: integration-tests/smoke/ccip/ccip_aptos_token_transfer_test.go
test_env_type: in-memory
runs_on: ubuntu-latest
triggers:
- PR Integration CCIP Tests
- Nightly Integration CCIP Tests
test_cmd: go test ./smoke/ccip -run "Test_CCIP_TokenTransfer_LnR_Aptos2EVM" -timeout 20m -test.parallel=1 -count=1 -json
test_go_project_path: integration-tests
aptos_cli_version: 7.8.1
install_plugins_public: true

- id: smoke/ccip/ccip_aptos_token_transfer_test.go:Test_CCIP_TokenTransfer_LnR_EVM2Aptos
path: integration-tests/smoke/ccip/ccip_aptos_token_transfer_test.go
test_env_type: in-memory
runs_on: ubuntu-latest
triggers:
- PR Integration CCIP Tests
- Nightly Integration CCIP Tests
test_cmd: go test ./smoke/ccip -run "Test_CCIP_TokenTransfer_LnR_EVM2Aptos" -timeout 20m -test.parallel=1 -count=1 -json
test_go_project_path: integration-tests
aptos_cli_version: 7.8.1
install_plugins_public: true

- id: smoke/ccip/ccip_aptos_token_transfer_test.go:Test_CCIP_TokenTransfer_LnR_without_TransferRef_EVM2Aptos
path: integration-tests/smoke/ccip/ccip_aptos_token_transfer_test.go
test_env_type: in-memory
runs_on: ubuntu-latest
triggers:
- PR Integration CCIP Tests
- Nightly Integration CCIP Tests
test_cmd: go test ./smoke/ccip -run "Test_CCIP_TokenTransfer_LnR_without_TransferRef_EVM2Aptos" -timeout 20m -test.parallel=1 -count=1 -json
test_go_project_path: integration-tests
aptos_cli_version: 7.8.1
install_plugins_public: true

- id: smoke/ccip/ccip_aptos_token_transfer_test.go:Test_CCIP_TokenTransfer_LnR_without_TransferRef_Aptos2EVM
path: integration-tests/smoke/ccip/ccip_aptos_token_transfer_test.go
test_env_type: in-memory
runs_on: ubuntu-latest
triggers:
- PR Integration CCIP Tests
- Nightly Integration CCIP Tests
test_cmd: go test ./smoke/ccip -run "Test_CCIP_TokenTransfer_LnR_without_TransferRef_Aptos2EVM" -timeout 20m -test.parallel=1 -count=1 -json
test_go_project_path: integration-tests
aptos_cli_version: 7.8.1
install_plugins_public: true

- id: smoke/ccip/ccip_aptos_msghasher_test.go:*
path: integration-tests/smoke/ccip/ccip_aptos_msghasher_test.go
test_env_type: in-memory
runs_on: ubuntu-latest
triggers:
- PR Integration CCIP Tests
- Nightly Integration CCIP Tests
test_cmd: go test ./smoke/ccip -run "Test_CCIP_AptosMessageHasher_OnChainVerification" -timeout 20m -test.parallel=1 -count=1 -json
test_go_project_path: integration-tests
aptos_cli_version: 7.8.1
install_plugins_public: true

- id: smoke/ccip/ccip_aptos_regulated_token_transfer_test.go:Test_CCIP_RegulatedTokenTransfer_EVM2Aptos
path: integration-tests/smoke/ccip/ccip_aptos_regulated_token_transfer_test.go
test_env_type: in-memory
runs_on: ubuntu-latest
triggers:
- PR Integration CCIP Tests
- Nightly Integration CCIP Tests
test_cmd: go test ./smoke/ccip -run "Test_CCIP_RegulatedTokenTransfer_EVM2Aptos" -timeout 20m -test.parallel=1 -count=1 -json
test_go_project_path: integration-tests
aptos_cli_version: 7.8.1
install_plugins_public: true

- id: smoke/ccip/ccip_aptos_regulated_token_transfer_test.go:Test_CCIP_RegulatedTokenTransfer_Aptos2EVM
path: integration-tests/smoke/ccip/ccip_aptos_regulated_token_transfer_test.go
test_env_type: in-memory
runs_on: ubuntu-latest
triggers:
- PR Integration CCIP Tests
- Nightly Integration CCIP Tests
test_cmd: go test ./smoke/ccip -run "Test_CCIP_RegulatedTokenTransfer_Aptos2EVM" -timeout 20m -test.parallel=1 -count=1 -json
test_go_project_path: integration-tests
aptos_cli_version: 7.8.1
install_plugins_public: true

# TON tests
- id: smoke/ccip/ccip_ton_messaging_test.go:Test_CCIPMessaging_TON2EVM
path: integration-tests/smoke/ccip/ccip_ton_messaging_test.go
Expand All @@ -656,4 +776,53 @@ runner-test-matrix:
test_cmd: go test ./smoke/ccip -run "Test_CCIPMessaging_EVM2TON" -timeout 20m -test.parallel=1 -count=1 -json
test_go_project_path: integration-tests
install_plugins_public: true

# Sui tests
- id: smoke/ccip/ccip_sui_messaging_test.go:Test_CCIP_Messaging_Sui2EVM
path: integration-tests/smoke/ccip/ccip_sui_messaging_test.go
test_env_type: in-memory
runs_on: ubuntu-latest
triggers:
- PR Integration CCIP Tests
- Nightly Integration CCIP Tests
test_cmd: go test ./smoke/ccip -run "Test_CCIP_Messaging_Sui2EVM" -timeout 10m -test.parallel=1 -count=1 -json
test_go_project_path: integration-tests
sui_cli_version: mainnet-1.57.2
install_plugins_public: true

- id: smoke/ccip/ccip_sui_messaging_test.go:Test_CCIP_Messaging_EVM2Sui
path: integration-tests/smoke/ccip/ccip_sui_messaging_test.go
test_env_type: in-memory
runs_on: ubuntu-latest
triggers:
- PR Integration CCIP Tests
- Nightly Integration CCIP Tests
test_cmd: go test ./smoke/ccip -run "Test_CCIP_Messaging_EVM2Sui" -timeout 10m -test.parallel=1 -count=1 -json
test_go_project_path: integration-tests
sui_cli_version: mainnet-1.57.2
install_plugins_public: true

- id: smoke/ccip/ccip_sui_token_transfer_test.go:Test_CCIPTokenTransfer_Sui2EVM
path: integration-tests/smoke/ccip/ccip_sui_token_transfer_test.go
test_env_type: in-memory
runs_on: ubuntu-latest
triggers:
- PR Integration CCIP Tests
- Nightly Integration CCIP Tests
test_cmd: go test ./smoke/ccip -run "Test_CCIPTokenTransfer_Sui2EVM" -timeout 10m -test.parallel=1 -count=1 -json
test_go_project_path: integration-tests
sui_cli_version: mainnet-1.57.2
install_plugins_public: true

- id: smoke/ccip/ccip_sui_token_transfer_test.go:Test_CCIPTokenTransfer_EVM2SUI
path: integration-tests/smoke/ccip/ccip_sui_token_transfer_test.go
test_env_type: in-memory
runs_on: ubuntu-latest
triggers:
- PR Integration CCIP Tests
- Nightly Integration CCIP Tests
test_cmd: go test ./smoke/ccip -run "Test_CCIPTokenTransfer_EVM2SUI" -timeout 10m -test.parallel=1 -count=1 -json
test_go_project_path: integration-tests
sui_cli_version: mainnet-1.57.2
install_plugins_public: true
# END: CCIP tests
7 changes: 7 additions & 0 deletions .github/workflows/ci-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ jobs:
should-run: ${{ needs.filter.outputs.should-run-deployment-tests }}
setup-solana: "true"
setup-aptos: "true"
setup-sui: "true"
trunk-auto-quarantine: "true"

name: Core Tests (${{ matrix.type.cmd }}) # Be careful modifying the job name, as it is used to fetch the job URL
Expand Down Expand Up @@ -244,6 +245,12 @@ jobs:
with:
CLI_VERSION: 7.8.1

- name: Setup Sui CLI v1.57.2
if: ${{ matrix.type.should-run == 'true' && matrix.type.setup-sui == 'true' }}
uses: ./.github/actions/setup-sui
with:
version: mainnet-1.57.2

- name: Setup wasmd
if: ${{ matrix.type.should-run == 'true' }}
uses: ./.github/actions/setup-wasmd
Expand Down
5 changes: 4 additions & 1 deletion core/capabilities/ccip/ccipaptos/pluginconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,23 @@ func initializePluginConfigFunc(chainselFamily string) ccipcommon.InitFunction {
var cwProvider ccipcommon.ChainRWProvider
var transmitterFactory types.ContractTransmitterFactory
var msgHasher ccipocr3.MessageHasher
var executeCodec ccipocr3.ExecutePluginCodec

if chainselFamily == chainsel.FamilyAptos {
cwProvider = ChainCWProvider{}
transmitterFactory = ocrimpls.NewAptosContractTransmitterFactory(extraDataCodec)
msgHasher = NewMessageHasherV1(logger.Sugared(lggr).Named(chainselFamily).Named("MessageHasherV1"), extraDataCodec)
executeCodec = NewExecutePluginCodecV1(extraDataCodec)
} else {
cwProvider = ccipsui.ChainCWProvider{}
transmitterFactory = ocrimpls.NewSuiContractTransmitterFactory(extraDataCodec)
msgHasher = ccipsui.NewMessageHasherV1(logger.Sugared(lggr).Named(chainselFamily).Named("MessageHasherV1"), extraDataCodec)
executeCodec = ccipsui.NewExecutePluginCodecV1(extraDataCodec)
}

return ccipcommon.PluginConfig{
CommitPluginCodec: NewCommitPluginCodecV1(),
ExecutePluginCodec: NewExecutePluginCodecV1(extraDataCodec),
ExecutePluginCodec: executeCodec,
MessageHasher: msgHasher,
TokenDataEncoder: NewAptosTokenDataEncoder(),
GasEstimateProvider: NewGasEstimateProvider(),
Expand Down
2 changes: 1 addition & 1 deletion core/capabilities/ccip/ccipevm/gas_helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/message_hasher"
"github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_3/message_hasher"
"github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3"
)

Expand Down
7 changes: 5 additions & 2 deletions core/capabilities/ccip/ccipevm/msghasher.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
chainsel "github.com/smartcontractkit/chain-selectors"

"github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/message_hasher"
"github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_3/message_hasher"
"github.com/smartcontractkit/chainlink-ccip/pkg/logutil"
cciptypes "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3"
"github.com/smartcontractkit/chainlink-common/pkg/logger"
Expand Down Expand Up @@ -332,5 +331,9 @@ func SerializeClientSVMExtraArgsV1(data message_hasher.ClientSVMExtraArgsV1) ([]
return SerializeExtraArgs(svmExtraArgsV1Tag, "encodeSVMExtraArgsV1", data)
}

func SerializeClientSUIExtraArgsV1(data message_hasher.ClientSuiExtraArgsV1) ([]byte, error) {
return SerializeExtraArgs(suiVMExtraArgsV1Tag, "encodeSUIExtraArgsV1", data)
}

// Interface compliance check
var _ cciptypes.MessageHasher = (*MessageHasherV1)(nil)
Loading
Loading