Skip to content

Commit a880c15

Browse files
committed
remove cross-fam import
1 parent ea65f82 commit a880c15

6 files changed

Lines changed: 89 additions & 137 deletions

File tree

chains/evm/deployment/common/msghasher.go

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import (
1414
chainsel "github.com/smartcontractkit/chain-selectors"
1515

1616
"github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_3/message_hasher"
17+
"github.com/smartcontractkit/chainlink-ccip/deployment/common/extraargs"
1718
"github.com/smartcontractkit/chainlink-ccip/pkg/logutil"
1819
cciptypes "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3"
1920
"github.com/smartcontractkit/chainlink-common/pkg/logger"
@@ -30,18 +31,6 @@ var (
3031
ANY_2_EVM_MESSAGE_HASH = utils.Keccak256Fixed([]byte("Any2EVMMessageHashV1"))
3132

3233
messageHasherABI = types.MustGetABI(message_hasher.MessageHasherABI)
33-
34-
// bytes4 public constant EVM_EXTRA_ARGS_V1_TAG = 0x97a657c9;
35-
evmExtraArgsV1Tag = hexutil.MustDecode("0x97a657c9")
36-
37-
// bytes4 public constant EVM_EXTRA_ARGS_V2_TAG = 0x181dcf10;
38-
evmExtraArgsV2Tag = hexutil.MustDecode("0x181dcf10")
39-
40-
// bytes4 public constant SVM_EXTRA_EXTRA_ARGS_V1_TAG = 0x1f3b3aba
41-
svmExtraArgsV1Tag = hexutil.MustDecode("0x1f3b3aba")
42-
43-
// bytes4 public constant SUI_EXTRA_ARGS_V1_TAG = 0x21ea4ca9
44-
suiVMExtraArgsV1Tag = hexutil.MustDecode("0x21ea4ca9")
4534
)
4635

4736
// MessageHasherV1 implements the MessageHasher interface.
@@ -315,25 +304,43 @@ func extractDestGasAmountFromMap(input map[string]any) (uint32, error) {
315304
return 0, errors.New("invalid token message, dest gas amount not found in the DestExecDataDecoded map")
316305
}
317306

318-
func SerializeExtraArgs(tag []byte, method string, inputs ...any) ([]byte, error) {
307+
func serializeExtraArgs(tag []byte, method string, inputs ...any) ([]byte, error) {
319308
v, err := messageHasherABI.Methods[method].Inputs.Pack(inputs...)
320309
return append(tag, v...), err
321310
}
322311

323-
func SerializeEVMExtraArgsV1(data message_hasher.ClientEVMExtraArgsV1) ([]byte, error) {
324-
return SerializeExtraArgs(evmExtraArgsV1Tag, "encodeEVMExtraArgsV1", data)
312+
func SerializeEVMExtraArgsV1(data extraargs.ClientEVMExtraArgsV1) ([]byte, error) {
313+
return serializeExtraArgs(extraargs.EVMExtraArgsV1Tag, "encodeEVMExtraArgsV1",
314+
message_hasher.ClientEVMExtraArgsV1{GasLimit: data.GasLimit})
325315
}
326316

327-
func SerializeClientGenericExtraArgsV2(data message_hasher.ClientGenericExtraArgsV2) ([]byte, error) {
328-
return SerializeExtraArgs(evmExtraArgsV2Tag, "encodeGenericExtraArgsV2", data)
317+
func SerializeClientGenericExtraArgsV2(data extraargs.ClientGenericExtraArgsV2) ([]byte, error) {
318+
return serializeExtraArgs(extraargs.GenericExtraArgsV2Tag, "encodeGenericExtraArgsV2",
319+
message_hasher.ClientGenericExtraArgsV2{
320+
GasLimit: data.GasLimit,
321+
AllowOutOfOrderExecution: data.AllowOutOfOrderExecution,
322+
})
329323
}
330324

331-
func SerializeClientSVMExtraArgsV1(data message_hasher.ClientSVMExtraArgsV1) ([]byte, error) {
332-
return SerializeExtraArgs(svmExtraArgsV1Tag, "encodeSVMExtraArgsV1", data)
325+
func SerializeClientSVMExtraArgsV1(data extraargs.ClientSVMExtraArgsV1) ([]byte, error) {
326+
return serializeExtraArgs(extraargs.SVMExtraArgsV1Tag, "encodeSVMExtraArgsV1",
327+
message_hasher.ClientSVMExtraArgsV1{
328+
ComputeUnits: data.ComputeUnits,
329+
AccountIsWritableBitmap: data.AccountIsWritableBitmap,
330+
AllowOutOfOrderExecution: data.AllowOutOfOrderExecution,
331+
TokenReceiver: data.TokenReceiver,
332+
Accounts: data.Accounts,
333+
})
333334
}
334335

335-
func SerializeClientSUIExtraArgsV1(data message_hasher.ClientSuiExtraArgsV1) ([]byte, error) {
336-
return SerializeExtraArgs(suiVMExtraArgsV1Tag, "encodeSUIExtraArgsV1", data)
336+
func SerializeClientSUIExtraArgsV1(data extraargs.ClientSuiExtraArgsV1) ([]byte, error) {
337+
return serializeExtraArgs(extraargs.SUIExtraArgsV1Tag, "encodeSUIExtraArgsV1",
338+
message_hasher.ClientSuiExtraArgsV1{
339+
GasLimit: data.GasLimit,
340+
AllowOutOfOrderExecution: data.AllowOutOfOrderExecution,
341+
TokenReceiver: data.TokenReceiver,
342+
ReceiverObjectIds: data.ReceiverObjectIds,
343+
})
337344
}
338345

339346
// Interface compliance check

chains/evm/deployment/v1_6_0/testadapter/test_adapter.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ import (
3636
"github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/nonce_manager"
3737
"github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/offramp"
3838
"github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/onramp"
39-
msg_hasher163 "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_3/message_hasher"
4039
ccipcommon "github.com/smartcontractkit/chainlink-ccip/chains/evm/deployment/common"
40+
"github.com/smartcontractkit/chainlink-ccip/deployment/common/extraargs"
4141
"github.com/smartcontractkit/chainlink-ccip/deployment/testadapters"
4242
tokensapi "github.com/smartcontractkit/chainlink-ccip/deployment/tokens"
4343
cciputils "github.com/smartcontractkit/chainlink-ccip/deployment/utils"
@@ -294,7 +294,7 @@ func (a *EVMAdapter) NativeFeeToken() string {
294294
func (a *EVMAdapter) GetExtraArgs(receiver []byte, sourceFamily string, opts ...testadapters.ExtraArgOpt) ([]byte, error) {
295295
switch sourceFamily {
296296
case chain_selectors.FamilyEVM:
297-
extraArgs := msg_hasher163.ClientGenericExtraArgsV2{
297+
extraArgs := extraargs.ClientGenericExtraArgsV2{
298298
GasLimit: new(big.Int).SetUint64(100_000),
299299
AllowOutOfOrderExecution: true,
300300
}

chains/solana/deployment/go.mod

Lines changed: 1 addition & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ replace (
99
// Make sure we're working with the latest chainlink-ccip
1010
github.com/smartcontractkit/chainlink-ccip => ../../../
1111

12-
// Make sure we're working with the latest chainlink-ccip/chains/evm
13-
github.com/smartcontractkit/chainlink-ccip/chains/evm => ../../../chains/evm
14-
1512
// Make sure we're working with the latest chainlink-ccip/chains/solana
1613
github.com/smartcontractkit/chainlink-ccip/chains/solana => ../
1714

@@ -26,7 +23,6 @@ require (
2623
github.com/gagliardetto/solana-go v1.13.0
2724
github.com/rs/zerolog v1.34.0
2825
github.com/smartcontractkit/chain-selectors v1.0.98
29-
github.com/smartcontractkit/chainlink-ccip/chains/evm v0.0.0-00010101000000-000000000000
3026
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260121163256-85accaf3d28d
3127
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260312233953-f588f8dc6d7c
3228
github.com/smartcontractkit/chainlink-ccip/deployment v0.0.0-20260407160429-e6e3a1570ff1
@@ -44,7 +40,7 @@ require (
4440
github.com/creachadair/jrpc2 v1.2.0 // indirect
4541
github.com/creachadair/mds v0.13.4 // indirect
4642
github.com/digital-asset/dazl-client/v8 v8.9.0 // indirect
47-
github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20260407160429-e6e3a1570ff1 // indirect
43+
github.com/onsi/gomega v1.36.2 // indirect
4844
github.com/stellar/go-stellar-sdk v0.1.0 // indirect
4945
github.com/stellar/go-xdr v0.0.0-20231122183749-b53fb00bcac2 // indirect
5046
github.com/stretchr/objx v0.5.2 // indirect
@@ -55,10 +51,8 @@ require (
5551
require (
5652
filippo.io/edwards25519 v1.1.1 // indirect
5753
github.com/BurntSushi/toml v1.5.0 // indirect
58-
github.com/DataDog/zstd v1.5.6 // indirect
5954
github.com/Microsoft/go-winio v0.6.2 // indirect
6055
github.com/ProjectZKM/Ziren/crates/go-runtime/zkvm_runtime v0.0.0-20251001021608-1fe7b43fc4d6 // indirect
61-
github.com/VictoriaMetrics/fastcache v1.13.0 // indirect
6256
github.com/XSAM/otelsql v0.37.0 // indirect
6357
github.com/aptos-labs/aptos-go-sdk v1.12.0 // indirect
6458
github.com/avast/retry-go/v4 v4.7.0 // indirect
@@ -78,33 +72,21 @@ require (
7872
github.com/cespare/xxhash/v2 v2.3.0 // indirect
7973
github.com/cloudevents/sdk-go/binding/format/protobuf/v2 v2.16.1 // indirect
8074
github.com/cloudevents/sdk-go/v2 v2.16.1 // indirect
81-
github.com/cockroachdb/errors v1.11.3 // indirect
82-
github.com/cockroachdb/fifo v0.0.0-20240816210425-c5d0cb0b6fc0 // indirect
83-
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
84-
github.com/cockroachdb/pebble v1.1.5 // indirect
85-
github.com/cockroachdb/redact v1.1.5 // indirect
86-
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
8775
github.com/coder/websocket v1.8.14 // indirect
8876
github.com/consensys/gnark-crypto v0.19.2 // indirect
8977
github.com/cosmos/go-bip39 v1.0.0 // indirect
90-
github.com/cpuguy83/go-md2man/v2 v2.0.7 // indirect
9178
github.com/crate-crypto/go-eth-kzg v1.5.0 // indirect
9279
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
93-
github.com/dchest/siphash v1.2.3 // indirect
9480
github.com/deckarep/golang-set/v2 v2.8.0 // indirect
9581
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect
96-
github.com/emicklei/dot v1.6.2 // indirect
9782
github.com/ethereum/c-kzg-4844/v2 v2.1.6 // indirect
98-
github.com/ethereum/go-bigmodexpfix v0.0.0-20250911101455-f9e208c548ab // indirect
9983
github.com/fatih/color v1.18.0 // indirect
10084
github.com/fbsobreira/gotron-sdk v0.0.0-20250403083053-2943ce8c759b // indirect
101-
github.com/ferranbt/fastssz v0.1.4 // indirect
10285
github.com/fsnotify/fsnotify v1.9.0 // indirect
10386
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
10487
github.com/gabriel-vasile/mimetype v1.4.13 // indirect
10588
github.com/gagliardetto/metaplex-go v0.2.1
10689
github.com/gagliardetto/treeout v0.1.4 // indirect
107-
github.com/getsentry/sentry-go v0.27.0 // indirect
10890
github.com/go-json-experiment/json v0.0.0-20250223041408-d3c622f1b874 // indirect
10991
github.com/go-logr/logr v1.4.3 // indirect
11092
github.com/go-logr/stdr v1.2.2 // indirect
@@ -113,29 +95,19 @@ require (
11395
github.com/go-playground/universal-translator v0.18.1 // indirect
11496
github.com/go-playground/validator/v10 v10.30.1 // indirect
11597
github.com/go-viper/mapstructure/v2 v2.5.0 // indirect
116-
github.com/gofrs/flock v0.12.1 // indirect
117-
github.com/gogo/protobuf v1.3.2 // indirect
118-
github.com/golang-jwt/jwt/v4 v4.5.2 // indirect
11998
github.com/golang/protobuf v1.5.4 // indirect
120-
github.com/golang/snappy v1.0.0 // indirect
12199
github.com/google/go-cmp v0.7.0 // indirect
122100
github.com/google/uuid v1.6.0 // indirect
123101
github.com/gorilla/websocket v1.5.3 // indirect
124-
github.com/grafana/pyroscope-go v1.2.7 // indirect
125-
github.com/grafana/pyroscope-go/godeltaprof v0.1.9 // indirect
126102
github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1 // indirect
127103
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.2 // indirect
128104
github.com/grpc-ecosystem/grpc-gateway/v2 v2.28.0 // indirect
129-
github.com/hashicorp/go-bexpr v0.1.10 // indirect
130105
github.com/hashicorp/go-hclog v1.6.3 // indirect
131106
github.com/hashicorp/go-plugin v1.7.0 // indirect
132107
github.com/hashicorp/yamux v0.1.2 // indirect
133108
github.com/hasura/go-graphql-client v0.15.1 // indirect
134109
github.com/hdevalence/ed25519consensus v0.2.0 // indirect
135-
github.com/holiman/billy v0.0.0-20250707135307-f2f9b9aae7db // indirect
136-
github.com/holiman/bloomfilter/v2 v2.0.3 // indirect
137110
github.com/holiman/uint256 v1.3.2 // indirect
138-
github.com/huin/goupnp v1.3.0 // indirect
139111
github.com/invopop/jsonschema v0.13.0 // indirect
140112
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
141113
github.com/jackc/pgconn v1.14.3 // indirect
@@ -145,26 +117,19 @@ require (
145117
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
146118
github.com/jackc/pgtype v1.14.4 // indirect
147119
github.com/jackc/pgx/v4 v4.18.3 // indirect
148-
github.com/jackpal/go-nat-pmp v1.0.2 // indirect
149120
github.com/jinzhu/copier v0.4.0 // indirect
150121
github.com/jmoiron/sqlx v1.4.0 // indirect
151122
github.com/jpillora/backoff v1.0.0 // indirect
152123
github.com/json-iterator/go v1.1.12 // indirect
153124
github.com/karalabe/hid v1.0.1-0.20260315100226-f5d04adeffeb // indirect
154125
github.com/klauspost/compress v1.18.4 // indirect
155-
github.com/klauspost/cpuid/v2 v2.2.10 // indirect
156-
github.com/kr/pretty v0.3.1 // indirect
157-
github.com/kr/text v0.2.0 // indirect
158126
github.com/leodido/go-urn v1.4.0 // indirect
159127
github.com/lib/pq v1.10.9 // indirect
160128
github.com/logrusorgru/aurora v2.0.3+incompatible // indirect
161129
github.com/mailru/easyjson v0.9.0 // indirect
162130
github.com/mattn/go-colorable v0.1.14 // indirect
163131
github.com/mattn/go-isatty v0.0.20 // indirect
164-
github.com/minio/sha256-simd v1.0.1 // indirect
165132
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
166-
github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect
167-
github.com/mitchellh/pointerstructure v1.2.0 // indirect
168133
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
169134
github.com/modern-go/reflect2 v1.0.2 // indirect
170135
github.com/mostynb/zstdpool-freelist v0.0.0-20201229113212-927304c0c3b1 // indirect
@@ -173,20 +138,12 @@ require (
173138
github.com/oklog/run v1.2.0 // indirect
174139
github.com/pelletier/go-toml v1.9.5 // indirect
175140
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
176-
github.com/pion/dtls/v2 v2.2.12 // indirect
177-
github.com/pion/logging v0.2.2 // indirect
178-
github.com/pion/stun/v2 v2.0.0 // indirect
179-
github.com/pion/transport/v2 v2.2.10 // indirect
180-
github.com/pion/transport/v3 v3.0.1 // indirect
181141
github.com/pkg/errors v0.9.1 // indirect
182142
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
183143
github.com/prometheus/client_golang v1.23.2 // indirect
184144
github.com/prometheus/client_model v0.6.2 // indirect
185145
github.com/prometheus/common v0.66.1 // indirect
186146
github.com/prometheus/procfs v0.16.1 // indirect
187-
github.com/rogpeppe/go-internal v1.14.1 // indirect
188-
github.com/rs/cors v1.11.1 // indirect
189-
github.com/russross/blackfriday/v2 v2.1.0 // indirect
190147
github.com/samber/lo v1.52.0 // indirect
191148
github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect
192149
github.com/scylladb/go-reflectx v1.0.1 // indirect
@@ -195,8 +152,6 @@ require (
195152
github.com/sigurn/crc16 v0.0.0-20211026045750-20ab5afb07e3 // indirect
196153
github.com/smartcontractkit/chainlink-aptos v0.0.0-20260306142855-8d629e752265 // indirect
197154
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10 // indirect
198-
github.com/smartcontractkit/chainlink-evm v0.3.3 // indirect
199-
github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250717121125-2350c82883e2 // indirect
200155
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260226130359-963f935e0396 // indirect
201156
github.com/smartcontractkit/chainlink-protos/job-distributor v0.18.0 // indirect
202157
github.com/smartcontractkit/chainlink-protos/linking-service/go v0.0.0-20251002192024-d2ad9222409b // indirect
@@ -209,19 +164,15 @@ require (
209164
github.com/stephenlacy/go-ethereum-hdwallet v0.0.0-20230913225845-a4fa94429863 // indirect
210165
github.com/streamingfast/logging v0.0.0-20230608130331-f22c91403091 // indirect
211166
github.com/supranational/blst v0.3.16 // indirect
212-
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect
213167
github.com/tidwall/gjson v1.18.0 // indirect
214168
github.com/tidwall/match v1.1.1 // indirect
215169
github.com/tidwall/pretty v1.2.1 // indirect
216170
github.com/tklauser/go-sysconf v0.3.16 // indirect
217171
github.com/tklauser/numcpus v0.11.0 // indirect
218172
github.com/tyler-smith/go-bip39 v1.1.0 // indirect
219-
github.com/ugorji/go/codec v1.2.12 // indirect
220-
github.com/urfave/cli/v2 v2.27.7 // indirect
221173
github.com/valyala/fastjson v1.6.10 // indirect
222174
github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect
223175
github.com/x448/float16 v0.8.4 // indirect
224-
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect
225176
github.com/xssnick/tonutils-go v1.14.1
226177
github.com/yusufpapurcu/wmi v1.2.4 // indirect
227178
github.com/zksync-sdk/zksync2-go v1.1.1-0.20250620124214-2c742ee399c6 // indirect
@@ -262,8 +213,5 @@ require (
262213
google.golang.org/genproto/googleapis/rpc v0.0.0-20260401024825-9d38bb4040a9 // indirect
263214
google.golang.org/grpc v1.80.0 // indirect
264215
google.golang.org/protobuf v1.36.11 // indirect
265-
gopkg.in/guregu/null.v4 v4.0.0 // indirect
266-
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
267-
gopkg.in/yaml.v2 v2.4.0 // indirect
268216
gopkg.in/yaml.v3 v3.0.1 // indirect
269217
)

0 commit comments

Comments
 (0)