Skip to content

Commit e5394bf

Browse files
committed
alias CR/CW types to pkg/types/solana
1 parent 5b80c1b commit e5394bf

File tree

17 files changed

+425
-906
lines changed

17 files changed

+425
-906
lines changed

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ require (
99
github.com/gagliardetto/gofuzz v1.2.2
1010
github.com/gagliardetto/solana-go v1.13.0
1111
github.com/gagliardetto/treeout v0.1.4
12-
github.com/gagliardetto/utilz v0.1.1
1312
github.com/go-viper/mapstructure/v2 v2.4.0
1413
github.com/google/uuid v1.6.0
1514
github.com/hashicorp/go-plugin v1.6.3
@@ -22,7 +21,7 @@ require (
2221
github.com/smartcontractkit/chainlink-ccip v0.0.0-20250627133416-1d85eec09097
2322
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250707132450-d1f5f0be212a
2423
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250804184440-c0506474fc44
25-
github.com/smartcontractkit/chainlink-common v0.9.1-0.20250819154659-73aa8dc9bf8c
24+
github.com/smartcontractkit/chainlink-common v0.9.4-0.20250822210039-df24f468593d
2625
github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7
2726
github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20250717121125-2350c82883e2
2827
github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20250729142306-508e798f6a5d
@@ -58,6 +57,7 @@ require (
5857
github.com/fatih/color v1.18.0 // indirect
5958
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
6059
github.com/gabriel-vasile/mimetype v1.4.8 // indirect
60+
github.com/gagliardetto/utilz v0.1.3 // indirect
6161
github.com/go-json-experiment/json v0.0.0-20250223041408-d3c622f1b874 // indirect
6262
github.com/go-kit/log v0.2.1 // indirect
6363
github.com/go-logfmt/logfmt v0.6.0 // indirect

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ github.com/gagliardetto/solana-go v1.13.0 h1:uNzhjwdAdbq9xMaX2DF0MwXNMw6f8zdZ7JP
104104
github.com/gagliardetto/solana-go v1.13.0/go.mod h1:l/qqqIN6qJJPtxW/G1PF4JtcE3Zg2vD2EliZrr9Gn5k=
105105
github.com/gagliardetto/treeout v0.1.4 h1:ozeYerrLCmCubo1TcIjFiOWTTGteOOHND1twdFpgwaw=
106106
github.com/gagliardetto/treeout v0.1.4/go.mod h1:loUefvXTrlRG5rYmJmExNryyBRh8f89VZhmMOyCyqok=
107-
github.com/gagliardetto/utilz v0.1.1 h1:/etW4hl607emKg6R6Lj9jRJ9d6ue2AQOyjhuAwjzs1U=
108-
github.com/gagliardetto/utilz v0.1.1/go.mod h1:b+rGFkRHz3HWJD0RYMzat47JyvbTtpE0iEcYTRJTLLA=
107+
github.com/gagliardetto/utilz v0.1.3 h1:A+asc+6/3a9qNBrgticApj3yW5F7y4TaJd8Ijg+o0zM=
108+
github.com/gagliardetto/utilz v0.1.3/go.mod h1:b+rGFkRHz3HWJD0RYMzat47JyvbTtpE0iEcYTRJTLLA=
109109
github.com/go-json-experiment/json v0.0.0-20250223041408-d3c622f1b874 h1:F8d1AJ6M9UQCavhwmO6ZsrYLfG8zVFWfEfMS2MXPkSY=
110110
github.com/go-json-experiment/json v0.0.0-20250223041408-d3c622f1b874/go.mod h1:TiCD2a1pcmjd7YnhGH0f/zKNcCD06B029pHhzV23c2M=
111111
github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=
@@ -410,8 +410,8 @@ github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250707132450-d
410410
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250707132450-d1f5f0be212a/go.mod h1:XEtEV52YIISL1Xp2l9XqyXFonKF9WxuGQQJu/lMozl8=
411411
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250804184440-c0506474fc44 h1:S00lus9RPu5JuxKRtGEET+aIUfASahHpTRV5RgPARSI=
412412
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250804184440-c0506474fc44/go.mod h1:xtZNi6pOKdC3sLvokDvXOhgHzT+cyBqH/gWwvxTxqrg=
413-
github.com/smartcontractkit/chainlink-common v0.9.1-0.20250819154659-73aa8dc9bf8c h1:YXFwFoclQBL+B9C3xG07v5GNc31fUcib7hu+MzneFWI=
414-
github.com/smartcontractkit/chainlink-common v0.9.1-0.20250819154659-73aa8dc9bf8c/go.mod h1:0OMQFyxibohHOzskRmEz4wr+w0SdAFsU6CjW/VhRf34=
413+
github.com/smartcontractkit/chainlink-common v0.9.4-0.20250822210039-df24f468593d h1:z1DOZ+CrXqyS2OFPnUTqJCRH+QOpti8kpNS8uZ4KkbQ=
414+
github.com/smartcontractkit/chainlink-common v0.9.4-0.20250822210039-df24f468593d/go.mod h1:Kp54d3kbM4eGPEmJW7fcRWYUk6emXy+F5TEu5czFcH8=
415415
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.1 h1:ca2z5OXgnbBPQRxpwXwBLJsUA1+cAp5ncfW4Ssvd6eY=
416416
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.1/go.mod h1:NZv/qKYGFRnkjOYBouajnDfFoZ+WDa6H2KNmSf1dnKc=
417417
github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw=

integration-tests/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ require (
1616
github.com/pelletier/go-toml/v2 v2.2.4
1717
github.com/rs/zerolog v1.33.0
1818
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250805210128-7f8a0f403c3a
19-
github.com/smartcontractkit/chainlink-common v0.9.1-0.20250819154659-73aa8dc9bf8c
19+
github.com/smartcontractkit/chainlink-common v0.9.4-0.20250822210039-df24f468593d
2020
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20250819150450-95ef563f6e6d
2121
github.com/smartcontractkit/chainlink-solana v1.1.2-0.20250820135304-632bebc0e802
2222
github.com/smartcontractkit/chainlink-testing-framework/lib v1.54.4
@@ -172,7 +172,7 @@ require (
172172
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
173173
github.com/gabriel-vasile/mimetype v1.4.8 // indirect
174174
github.com/gagliardetto/treeout v0.1.4 // indirect
175-
github.com/gagliardetto/utilz v0.1.1 // indirect
175+
github.com/gagliardetto/utilz v0.1.3 // indirect
176176
github.com/getsentry/sentry-go v0.27.0 // indirect
177177
github.com/gibson042/canonicaljson-go v1.0.3 // indirect
178178
github.com/gin-contrib/sessions v0.0.5 // indirect

integration-tests/go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -464,8 +464,8 @@ github.com/gagliardetto/solana-go v1.13.0 h1:uNzhjwdAdbq9xMaX2DF0MwXNMw6f8zdZ7JP
464464
github.com/gagliardetto/solana-go v1.13.0/go.mod h1:l/qqqIN6qJJPtxW/G1PF4JtcE3Zg2vD2EliZrr9Gn5k=
465465
github.com/gagliardetto/treeout v0.1.4 h1:ozeYerrLCmCubo1TcIjFiOWTTGteOOHND1twdFpgwaw=
466466
github.com/gagliardetto/treeout v0.1.4/go.mod h1:loUefvXTrlRG5rYmJmExNryyBRh8f89VZhmMOyCyqok=
467-
github.com/gagliardetto/utilz v0.1.1 h1:/etW4hl607emKg6R6Lj9jRJ9d6ue2AQOyjhuAwjzs1U=
468-
github.com/gagliardetto/utilz v0.1.1/go.mod h1:b+rGFkRHz3HWJD0RYMzat47JyvbTtpE0iEcYTRJTLLA=
467+
github.com/gagliardetto/utilz v0.1.3 h1:A+asc+6/3a9qNBrgticApj3yW5F7y4TaJd8Ijg+o0zM=
468+
github.com/gagliardetto/utilz v0.1.3/go.mod h1:b+rGFkRHz3HWJD0RYMzat47JyvbTtpE0iEcYTRJTLLA=
469469
github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 h1:f6D9Hr8xV8uYKlyuj8XIruxlh9WjVjdh1gIicAS7ays=
470470
github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww=
471471
github.com/gedex/inflector v0.0.0-20170307190818-16278e9db813 h1:Uc+IZ7gYqAf/rSGFplbWBSHaGolEQlNLgMgSE3ccnIQ=
@@ -1253,8 +1253,8 @@ github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250805210128-7
12531253
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250805210128-7f8a0f403c3a/go.mod h1:Ve1xD71bl193YIZQEoJMmBqLGQJdNs29bwbuObwvbhQ=
12541254
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250805210128-7f8a0f403c3a h1:38dAlTPRUQHZus5dCnBnQyf/V4oYn0p2svWlbPgHDQ4=
12551255
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250805210128-7f8a0f403c3a/go.mod h1:xtZNi6pOKdC3sLvokDvXOhgHzT+cyBqH/gWwvxTxqrg=
1256-
github.com/smartcontractkit/chainlink-common v0.9.1-0.20250819154659-73aa8dc9bf8c h1:YXFwFoclQBL+B9C3xG07v5GNc31fUcib7hu+MzneFWI=
1257-
github.com/smartcontractkit/chainlink-common v0.9.1-0.20250819154659-73aa8dc9bf8c/go.mod h1:0OMQFyxibohHOzskRmEz4wr+w0SdAFsU6CjW/VhRf34=
1256+
github.com/smartcontractkit/chainlink-common v0.9.4-0.20250822210039-df24f468593d h1:z1DOZ+CrXqyS2OFPnUTqJCRH+QOpti8kpNS8uZ4KkbQ=
1257+
github.com/smartcontractkit/chainlink-common v0.9.4-0.20250822210039-df24f468593d/go.mod h1:Kp54d3kbM4eGPEmJW7fcRWYUk6emXy+F5TEu5czFcH8=
12581258
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.1 h1:ca2z5OXgnbBPQRxpwXwBLJsUA1+cAp5ncfW4Ssvd6eY=
12591259
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.1/go.mod h1:NZv/qKYGFRnkjOYBouajnDfFoZ+WDa6H2KNmSf1dnKc=
12601260
github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw=

integration-tests/relayinterface/buffer_payload_test.go

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import (
1818
"github.com/smartcontractkit/chainlink-common/pkg/logger"
1919
"github.com/smartcontractkit/chainlink-common/pkg/services/servicetest"
2020
"github.com/smartcontractkit/chainlink-common/pkg/types"
21+
soltypes "github.com/smartcontractkit/chainlink-common/pkg/types/solana"
2122

2223
"github.com/smartcontractkit/chainlink-solana/contracts/generated/buffer_payload"
2324
"github.com/smartcontractkit/chainlink-solana/integration-tests/utils"
@@ -76,25 +77,25 @@ func Test_BufferPayload(t *testing.T) {
7677
contractName := "buffer"
7778
methodName := "execute"
7879

79-
cwConfig := chainwriter.ChainWriterConfig{
80-
Programs: map[string]chainwriter.ProgramConfig{
80+
cwConfig := soltypes.ContractWriterConfig{
81+
Programs: map[string]soltypes.ProgramConfig{
8182
contractName: {
82-
Methods: map[string]chainwriter.MethodConfig{
83+
Methods: map[string]soltypes.MethodConfig{
8384
methodName: {
8485
FromAddress: sender.PublicKey().String(),
8586
ChainSpecificName: "execute",
8687
ComputeUnitLimitOverhead: 150_000,
8788
BufferPayloadMethod: "CCIPExecutionReportBuffer",
88-
Accounts: []chainwriter.Lookup{
89+
Accounts: []soltypes.Lookup{
8990
{
90-
AccountConstant: &chainwriter.AccountConstant{
91+
AccountConstant: &soltypes.AccountConstant{
9192
Address: sender.PublicKey().String(),
9293
IsSigner: true,
9394
IsWritable: true,
9495
},
9596
},
9697
{
97-
AccountConstant: &chainwriter.AccountConstant{
98+
AccountConstant: &soltypes.AccountConstant{
9899
Address: solana.SystemProgramID.String(),
99100
IsSigner: false,
100101
IsWritable: false,
@@ -176,7 +177,7 @@ func Test_BufferPayload(t *testing.T) {
176177
})
177178
}
178179

179-
func initializeAndRunCW(t *testing.T, lggr logger.Logger, multiClient client.MultiClient, txm *txm.Txm, config chainwriter.ChainWriterConfig) *chainwriter.SolanaChainWriterService {
180+
func initializeAndRunCW(t *testing.T, lggr logger.Logger, multiClient client.MultiClient, txm *txm.Txm, config soltypes.ContractWriterConfig) *chainwriter.SolanaChainWriterService {
180181
cw, err := chainwriter.NewSolanaChainWriterService(lggr, multiClient, txm, nil, config)
181182
require.NoError(t, err)
182183
servicetest.Run(t, cw)

0 commit comments

Comments
 (0)