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
36 changes: 36 additions & 0 deletions .github/workflows/test-deployments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ jobs:
detect_deployments_changes:
runs-on: ubuntu-latest
outputs:
run_solana_deployment: ${{ steps.filter.outputs.run_solana_deployment }}
run_evm_deployment: ${{ steps.filter.outputs.run_evm_deployment }}
run_deployment: ${{ steps.filter.outputs.run_deployment }}
run_crosschain_deployment: ${{ steps.filter.outputs.run_crosschain_deployment }}
steps:
- uses: actions/checkout@v4
- name: Detect changes
Expand All @@ -28,6 +30,11 @@ jobs:
run_evm_deployment:
- 'chains/evm/gobindings/generated/**'
- 'chains/evm/deployment/**'
run_solana_deployment:
- 'chains/solana/gobindings/generated/**'
- 'chains/solana/deployment/**'
run_crosschain_deployment:
- 'integration-tests/deployment/**'

setup-go:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -55,6 +62,18 @@ jobs:
- name: Run tests
run: go test ./...

test-solana-deployments:
needs: [detect_deployments_changes, setup-go]
if: ${{ needs.detect_deployments_changes.outputs.run_solana_deployment == 'true' }}
runs-on: ubuntu-latest
defaults:
run:
working-directory: chains/solana/deployment
steps:
- uses: actions/checkout@v4
- name: Run tests
run: go test ./...

test-deployments:
needs: [detect_deployments_changes, setup-go]
if: ${{ needs.detect_deployments_changes.outputs.run_deployment == 'true' }}
Expand All @@ -66,3 +85,20 @@ jobs:
- uses: actions/checkout@v4
- name: Run tests
run: go test ./...

test-deployments-crosschain:
needs: [detect_deployments_changes, setup-go]
if: |-
${{
needs.detect_deployments_changes.outputs.run_crosschain_deployment == 'true' ||
needs.detect_deployments_changes.outputs.run_evm_deployment == 'true' ||
needs.detect_deployments_changes.outputs.run_solana_deployment == 'true'
}}
runs-on: ubuntu-latest
defaults:
run:
working-directory: integration-tests/deployment
steps:
- uses: actions/checkout@v4
- name: Run tests
run: go test ./...
9 changes: 3 additions & 6 deletions chains/evm/deployment/utils/sequences/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,14 @@ import (
"errors"
"fmt"

sequencescommon "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences"

"github.com/smartcontractkit/chainlink-deployments-framework/chain/evm"
"github.com/smartcontractkit/chainlink-deployments-framework/deployment"
)

// WithChainSelector is implemented by configs that specify a target chain selector.
type WithChainSelector interface {
ChainSelector() uint64
}

// ResolveEVMChainDep resolves an evm.Chain dependency from the environment based on the chain selector provided by the config.
func ResolveEVMChainDep[CFG WithChainSelector](e deployment.Environment, cfg CFG) (evm.Chain, error) {
func ResolveEVMChainDep[CFG sequencescommon.WithChainSelector](e deployment.Environment, cfg CFG) (evm.Chain, error) {
evmChains := e.BlockChains.EVMChains()
if evmChains == nil {
return evm.Chain{}, errors.New("no EVM chains found in environment")
Expand Down
3 changes: 2 additions & 1 deletion chains/evm/deployment/utils/sequences/chain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package sequences_test
import (
"testing"

sequencescommon "github.com/smartcontractkit/chainlink-ccip/deployment/utils/sequences"
"github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/utils/sequences"
"github.com/smartcontractkit/chainlink-deployments-framework/chain"
"github.com/smartcontractkit/chainlink-deployments-framework/chain/evm"
Expand All @@ -23,7 +24,7 @@ func TestResolveEVMChainDep(t *testing.T) {
desc string
expectedErr string
chains []chain.BlockChain
cfg sequences.WithChainSelector
cfg sequencescommon.WithChainSelector
}{
{
desc: "happy path",
Expand Down
4 changes: 2 additions & 2 deletions chains/evm/deployment/v1_6_0/sequences/update_lanes.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var ConfigureLaneLegAsSource = operations.NewSequence(
"Configures lane leg as source on CCIP 1.6.0",
func(b operations.Bundle, chains cldf_chain.BlockChains, input lanes.UpdateLanesInput) (sequences.OnChainOutput, error) {
var result sequences.OnChainOutput
fmt.Println("Configuring lane leg as source:", input)
fmt.Println("EVM Configuring lane leg as source:", input)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use b.Logger


result, err := sequences.RunAndMergeSequence(b, chains, FeeQuoterApplyDestChainConfigUpdatesSequence, FeeQuoterApplyDestChainConfigUpdatesSequenceInput{
Address: common.BytesToAddress(input.Source.FeeQuoter),
Expand Down Expand Up @@ -108,7 +108,7 @@ var ConfigureLaneLegAsDest = operations.NewSequence(
"Configures lane leg as destination on CCIP 1.6.0",
func(b operations.Bundle, chains cldf_chain.BlockChains, input lanes.UpdateLanesInput) (sequences.OnChainOutput, error) {
var result sequences.OnChainOutput
fmt.Println("Configuring lane leg as destination:", input)
fmt.Println("EVM Configuring lane leg as destination:", input)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use b.Logger


result, err := sequences.RunAndMergeSequence(b, chains, OffRampApplySourceChainConfigUpdatesSequence, OffRampApplySourceChainConfigUpdatesSequenceInput{
Address: common.BytesToAddress(input.Source.OffRamp),
Expand Down
3 changes: 3 additions & 0 deletions chains/solana/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@ override*.toml
# go work files
go.work*
devnet.config.yaml

# deployment
deployment/**/*.json
11 changes: 7 additions & 4 deletions chains/solana/deployment/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,20 @@ replace (
// Taken from CLDF go.mod: https://github.com/smartcontractkit/chainlink-deployments-framework/blob/main/go.mod
github.com/fbsobreira/gotron-sdk => github.com/smartcontractkit/chainlink-tron/relayer/gotron-sdk v0.0.4

// Make sure we're working with the latest chainlink-ccip
github.com/smartcontractkit/chainlink-ccip => ../../../

// Make sure we're working with the latest chainlink-ccip/deployment
github.com/smartcontractkit/chainlink-ccip/deployment => ../../../deployment
)

require (
github.com/Masterminds/semver/v3 v3.4.0
github.com/gagliardetto/binary v0.8.0
github.com/gagliardetto/solana-go v1.13.0
github.com/smartcontractkit/chain-selectors v1.0.72
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20251014191100-bad58388f0c9
github.com/smartcontractkit/chainlink-ccip/deployment v0.0.0-00010101000000-000000000000
github.com/smartcontractkit/chainlink-deployments-framework v0.56.0
)
Expand Down Expand Up @@ -55,8 +62,6 @@ require (
github.com/fsnotify/fsnotify v1.9.0 // indirect
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.8 // indirect
github.com/gagliardetto/binary v0.8.0 // indirect
github.com/gagliardetto/solana-go v1.13.0 // indirect
github.com/gagliardetto/treeout v0.1.4 // indirect
github.com/go-json-experiment/json v0.0.0-20250223041408-d3c622f1b874 // indirect
github.com/go-logr/logr v1.4.3 // indirect
Expand Down Expand Up @@ -123,8 +128,6 @@ require (
github.com/sigurn/crc16 v0.0.0-20211026045750-20ab5afb07e3 // indirect
github.com/smartcontractkit/chainlink-aptos v0.0.0-20250915164817-46a35eda083d // indirect
github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250911201806-5a095deaeb52 // indirect
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5 // indirect
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 // indirect
github.com/smartcontractkit/chainlink-common v0.9.6-0.20250929154511-1f5fbda7ae76 // indirect
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4 // indirect
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20250911124514-5874cc6d62b2 // indirect
Expand Down
6 changes: 2 additions & 4 deletions chains/solana/deployment/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -575,12 +575,10 @@ github.com/smartcontractkit/chain-selectors v1.0.72 h1:AExF2H3mABdLCN0QZd+IjU8Ck
github.com/smartcontractkit/chain-selectors v1.0.72/go.mod h1:xsKM0aN3YGcQKTPRPDDtPx2l4mlTN1Djmg0VVXV40b8=
github.com/smartcontractkit/chainlink-aptos v0.0.0-20250915164817-46a35eda083d h1:bcfnHPXAhrhUw95X60Y/lDhQAb4SxSyTrqyVCHqfXPI=
github.com/smartcontractkit/chainlink-aptos v0.0.0-20250915164817-46a35eda083d/go.mod h1:tEjqontct1/5cKHm4q75nopZa1rwzaQZwd9U9wn0uZE=
github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250911201806-5a095deaeb52 h1:q0rx7lax/Wi0GK3+fTn22sx4zp4HPPu+2m5fcE12Rn8=
github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250911201806-5a095deaeb52/go.mod h1:4djmYiCYf9BfpNcuhANzh/umrMKfhOQRGfnk1ZnL5Io=
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5 h1:GmJQqNrWn5pNc8YTei6l2TOSYjK2fRd4+edFZIifCrU=
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5/go.mod h1:Ve1xD71bl193YIZQEoJMmBqLGQJdNs29bwbuObwvbhQ=
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 h1:QhcYGEhRLInr1/qh/3RJiVdvJ0nxBHKhPe65WLbSBnU=
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5/go.mod h1:xtZNi6pOKdC3sLvokDvXOhgHzT+cyBqH/gWwvxTxqrg=
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20251014191100-bad58388f0c9 h1:cMzoreLtepEiB5pfYrvreXNoZideVRzQQKNr5Io5J7M=
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20251014191100-bad58388f0c9/go.mod h1:xtZNi6pOKdC3sLvokDvXOhgHzT+cyBqH/gWwvxTxqrg=
github.com/smartcontractkit/chainlink-common v0.9.6-0.20250929154511-1f5fbda7ae76 h1:Slnws8RoXRUYGgEMYK6X2yYzjZwNgVb93PxU45VEObQ=
github.com/smartcontractkit/chainlink-common v0.9.6-0.20250929154511-1f5fbda7ae76/go.mod h1:1r3aM96KHAESfnayJ3BTHCkP1qJS1BEG1r4czeoaXlA=
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.4 h1:hvqATtrZ0iMRTI80cpBot/3JFbjz2j+2tvpfooVhRHw=
Expand Down
32 changes: 32 additions & 0 deletions chains/solana/deployment/utils/artifact_versions.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package utils
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't need to review


// Mapping between Semver Tags and commit SHA from chainlink-ccip repository for Solana Contracts.
// Source tags (GitHub releases):
// - solana-v0.1.2
// - solana-v0.1.1-cctp
// - solana-v0.1.1
// - solana-v0.1.0

// Public version constants.
const (
// Versions for Chainlink CCIP Solana contracts
VersionSolanaV0_1_2 = "solana-v0.1.2"
VersionSolanaV0_1_1 = "solana-v0.1.1-cctp"
VersionSolanaV0_1_1TokenPools = "solana-v0.1.1"
VersionSolanaV0_1_0 = "solana-v0.1.0"
)

// VersionToShortCommitSHA maps a version tag to its corresponding short commit SHA.
var VersionToShortCommitSHA = map[string]string{
VersionSolanaV0_1_2: "b96a80a69ad2",
VersionSolanaV0_1_1: "7f8a0f403c3a",
VersionSolanaV0_1_1TokenPools: "ee587a6c0562",
VersionSolanaV0_1_0: "be8d09930aaa",
}

var VersionToFullCommitSHA = map[string]string{
VersionSolanaV0_1_2: "b96a80a69ad2696c48d645d0cf7807fd02a212c8",
VersionSolanaV0_1_1: "7f8a0f403c3acbf740fa6d50d71bfb80a8b12ab8",
VersionSolanaV0_1_1TokenPools: "ee587a6c056204009310019b790ed6d474825316",
VersionSolanaV0_1_0: "be8d09930aaaae31b574ef316ca73021fe272b08",
}
33 changes: 33 additions & 0 deletions chains/solana/deployment/utils/datastore.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package utils
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't need to review


import (
"fmt"

"github.com/gagliardetto/solana-go"
datastore_utils "github.com/smartcontractkit/chainlink-ccip/deployment/utils/datastore"
"github.com/smartcontractkit/chainlink-deployments-framework/datastore"
)

// ToByteArray formats a datastore.AddressRef into a byte slice.
func ToByteArray(ref datastore.AddressRef) (bytes []byte, err error) {
if ref.Address == "" {
return nil, fmt.Errorf("address is empty in ref: %s", datastore_utils.SprintRef(ref))
}
addr, err := ToAddress(ref)
if err != nil {
return nil, err
}
return addr.Bytes(), nil
}

// ToAddress formats a datastore.AddressRef into a solana.PublicKey.
func ToAddress(ref datastore.AddressRef) (commonAddress solana.PublicKey, err error) {
if ref.Address == "" {
return solana.PublicKey{}, fmt.Errorf("address is empty in ref: %s", datastore_utils.SprintRef(ref))
}
out, err := solana.PublicKeyFromBase58(ref.Address)
if err != nil {
return solana.PublicKey{}, fmt.Errorf("address is not a valid base58 address in ref: %s", datastore_utils.SprintRef(ref))
}
return out, nil
}
Loading
Loading