diff --git a/go.md b/go.md index b89b3068d..3dfcca6fb 100644 --- a/go.md +++ b/go.md @@ -113,6 +113,8 @@ flowchart LR chainlink-ccip --> chainlink-common chainlink-ccip --> chainlink-protos/rmn/v1.6/go click chainlink-ccip href "https://github.com/smartcontractkit/chainlink-ccip" + chainlink-ccip/ccv/chains/evm + click chainlink-ccip/ccv/chains/evm href "https://github.com/smartcontractkit/chainlink-ccip" chainlink-ccip/chains/solana --> chainlink-ccip chainlink-ccip/chains/solana --> chainlink-ccip/chains/solana/gobindings click chainlink-ccip/chains/solana href "https://github.com/smartcontractkit/chainlink-ccip" @@ -120,6 +122,11 @@ flowchart LR click chainlink-ccip/chains/solana/gobindings href "https://github.com/smartcontractkit/chainlink-ccip" chainlink-ccip/deployment click chainlink-ccip/deployment href "https://github.com/smartcontractkit/chainlink-ccip" + chainlink-ccv --> chainlink-ccip/ccv/chains/evm + chainlink-ccv --> chainlink-evm + chainlink-ccv --> chainlink-protos/chainlink-ccv/committee-verifier + chainlink-ccv --> chainlink-protos/chainlink-ccv/message-discovery + click chainlink-ccv href "https://github.com/smartcontractkit/chainlink-ccv" chainlink-common --> chain-selectors chainlink-common --> chainlink-common/pkg/chipingress chainlink-common --> chainlink-protos/billing/go @@ -147,6 +154,7 @@ flowchart LR chainlink-deployments-framework --> chainlink-tron/relayer chainlink-deployments-framework --> mcms click chainlink-deployments-framework href "https://github.com/smartcontractkit/chainlink-deployments-framework" + chainlink-evm --> chainlink-common/keystore chainlink-evm --> chainlink-evm/gethwrappers chainlink-evm --> chainlink-framework/capabilities chainlink-evm --> chainlink-framework/chains @@ -167,6 +175,12 @@ flowchart LR click chainlink-framework/multinode href "https://github.com/smartcontractkit/chainlink-framework" chainlink-protos/billing/go --> chainlink-protos/workflows/go click chainlink-protos/billing/go href "https://github.com/smartcontractkit/chainlink-protos" + chainlink-protos/chainlink-ccv/committee-verifier --> chainlink-protos/chainlink-ccv/verifier + click chainlink-protos/chainlink-ccv/committee-verifier href "https://github.com/smartcontractkit/chainlink-protos" + chainlink-protos/chainlink-ccv/message-discovery --> chainlink-protos/chainlink-ccv/verifier + click chainlink-protos/chainlink-ccv/message-discovery href "https://github.com/smartcontractkit/chainlink-protos" + chainlink-protos/chainlink-ccv/verifier + click chainlink-protos/chainlink-ccv/verifier href "https://github.com/smartcontractkit/chainlink-protos" chainlink-protos/cre/go click chainlink-protos/cre/go href "https://github.com/smartcontractkit/chainlink-protos" chainlink-protos/job-distributor @@ -217,6 +231,7 @@ flowchart LR chainlink-testing-framework/wasp click chainlink-testing-framework/wasp href "https://github.com/smartcontractkit/chainlink-testing-framework" chainlink-ton --> chainlink-ccip + chainlink-ton --> chainlink-framework/metrics click chainlink-ton href "https://github.com/smartcontractkit/chainlink-ton" chainlink-ton/deployment click chainlink-ton/deployment href "https://github.com/smartcontractkit/chainlink-ton" @@ -237,8 +252,8 @@ flowchart LR chainlink/integration-tests --> chainlink/deployment click chainlink/integration-tests href "https://github.com/smartcontractkit/chainlink" chainlink/v2 --> chainlink-automation + chainlink/v2 --> chainlink-ccv chainlink/v2 --> chainlink-data-streams - chainlink/v2 --> chainlink-evm chainlink/v2 --> chainlink-feeds chainlink/v2 --> chainlink-protos/orchestrator chainlink/v2 --> chainlink-solana @@ -291,6 +306,7 @@ flowchart LR subgraph chainlink-ccip-repo[chainlink-ccip] chainlink-ccip + chainlink-ccip/ccv/chains/evm chainlink-ccip/chains/solana chainlink-ccip/chains/solana/gobindings chainlink-ccip/deployment @@ -322,6 +338,9 @@ flowchart LR subgraph chainlink-protos-repo[chainlink-protos] chainlink-protos/billing/go + chainlink-protos/chainlink-ccv/committee-verifier + chainlink-protos/chainlink-ccv/message-discovery + chainlink-protos/chainlink-ccv/verifier chainlink-protos/cre/go chainlink-protos/job-distributor chainlink-protos/linking-service/go diff --git a/go.mod b/go.mod index 24fe9f13f..96b4a7dc2 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,6 @@ require ( github.com/gagliardetto/gofuzz v1.2.2 github.com/gagliardetto/solana-go v1.13.0 github.com/gagliardetto/treeout v0.1.4 - github.com/gagliardetto/utilz v0.1.3 github.com/go-viper/mapstructure/v2 v2.4.0 github.com/google/uuid v1.6.0 github.com/hashicorp/go-plugin v1.7.0 @@ -75,6 +74,7 @@ require ( github.com/fsnotify/fsnotify v1.8.0 // indirect github.com/fxamacker/cbor/v2 v2.7.0 // indirect github.com/gabriel-vasile/mimetype v1.4.8 // indirect + github.com/gagliardetto/utilz v0.1.3 // indirect github.com/go-json-experiment/json v0.0.0-20250223041408-d3c622f1b874 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect diff --git a/integration-tests/go.mod b/integration-tests/go.mod index e77bb5a51..dbb9792f8 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -1,6 +1,6 @@ module github.com/smartcontractkit/chainlink-solana/integration-tests -go 1.25.3 +go 1.25.5 replace github.com/smartcontractkit/chainlink-solana => ../ @@ -15,24 +15,24 @@ require ( github.com/lib/pq v1.10.9 github.com/pelletier/go-toml/v2 v2.2.4 github.com/rs/zerolog v1.34.0 - github.com/smartcontractkit/chain-selectors v1.0.82 - github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20251105200616-e158f436aa95 + github.com/smartcontractkit/chain-selectors v1.0.85 + github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20251128020529-88d93b01d749 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250912190424-fd2e35d7deb5 - github.com/smartcontractkit/chainlink-common v0.9.6-0.20251124171825-b2109f37ee77 + github.com/smartcontractkit/chainlink-common v0.9.6-0.20251219154553-3688afcb0761 github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20251124151448-0448aefdaab9 - github.com/smartcontractkit/chainlink-solana v1.1.2-0.20251105160343-b77843a1daf4 + github.com/smartcontractkit/chainlink-solana v1.1.2-0.20251229211535-574263ed91a7 github.com/smartcontractkit/chainlink-testing-framework/lib v1.54.7 github.com/smartcontractkit/chainlink-testing-framework/parrot v0.6.2 github.com/smartcontractkit/chainlink-testing-framework/seth v1.51.2 - github.com/smartcontractkit/chainlink/deployment v0.0.0-20251114183516-c3b1a4a2be75 - github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20251114183516-c3b1a4a2be75 - github.com/smartcontractkit/chainlink/v2 v2.29.1-cre-beta.0.0.20251114183516-c3b1a4a2be75 - github.com/smartcontractkit/libocr v0.0.0-20251031190958-7324c200a6b0 + github.com/smartcontractkit/chainlink/deployment v0.0.0-20251229212039-6b9a19bf2c9f + github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20251229212039-6b9a19bf2c9f + github.com/smartcontractkit/chainlink/v2 v2.29.1-cre-beta.0.0.20251229212039-6b9a19bf2c9f + github.com/smartcontractkit/libocr v0.0.0-20251212213002-0a5e2f907dda github.com/stretchr/testify v1.11.1 github.com/testcontainers/testcontainers-go v0.39.0 go.uber.org/zap v1.27.0 golang.org/x/exp v0.0.0-20250711185948-6ae5c78190dc - golang.org/x/sync v0.18.0 + golang.org/x/sync v0.19.0 golang.org/x/text v0.31.0 gopkg.in/guregu/null.v4 v4.0.0 ) @@ -56,7 +56,7 @@ require ( github.com/AlekSi/pointer v1.1.0 // indirect github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 // indirect - github.com/BurntSushi/toml v1.4.0 // indirect + github.com/BurntSushi/toml v1.5.0 // indirect github.com/DataDog/zstd v1.5.6 // indirect github.com/Khan/genqlient v0.7.0 // indirect github.com/MakeNowJust/heredoc v1.0.0 // indirect @@ -64,38 +64,40 @@ require ( github.com/Microsoft/go-winio v0.6.2 // indirect github.com/NethermindEth/juno v0.12.5 // indirect github.com/NethermindEth/starknet.go v0.8.0 // indirect - github.com/VictoriaMetrics/fastcache v1.12.2 // indirect + github.com/ProjectZKM/Ziren/crates/go-runtime/zkvm_runtime v0.0.0-20251001021608-1fe7b43fc4d6 // indirect + github.com/VictoriaMetrics/fastcache v1.13.0 // indirect github.com/XSAM/otelsql v0.37.0 // indirect github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b // indirect - github.com/andybalholm/brotli v1.1.1 // indirect + github.com/andybalholm/brotli v1.2.0 // indirect github.com/apache/arrow-go/v18 v18.3.1 // indirect github.com/aptos-labs/aptos-go-sdk v1.11.0 // indirect github.com/atombender/go-jsonschema v0.16.1-0.20240916205339-a74cd4e2851c // indirect github.com/avast/retry-go v3.0.0+incompatible // indirect github.com/avast/retry-go/v4 v4.6.1 // indirect github.com/awalterschulze/gographviz v2.0.3+incompatible // indirect - github.com/aws/aws-sdk-go-v2 v1.38.1 // indirect - github.com/aws/aws-sdk-go-v2/config v1.29.14 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.17.67 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.4 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.4 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15 // indirect + github.com/aws/aws-sdk-go-v2 v1.39.6 // indirect + github.com/aws/aws-sdk-go-v2/config v1.31.17 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.18.21 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.13 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.13 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.13 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.8.4 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.3 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.13 // indirect github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.34.2 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.25.3 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.33.19 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.30.1 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.5 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.39.1 // indirect github.com/aws/constructs-go/constructs/v10 v10.4.2 // indirect github.com/aws/jsii-runtime-go v1.104.0 // indirect - github.com/aws/smithy-go v1.22.5 // indirect + github.com/aws/smithy-go v1.23.2 // indirect github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59 // indirect github.com/bahlo/generic-list-go v0.2.0 // indirect + github.com/beevik/ntp v1.5.0 // indirect github.com/benbjohnson/clock v1.3.5 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect - github.com/bits-and-blooms/bitset v1.20.0 // indirect + github.com/bits-and-blooms/bitset v1.24.0 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/blendle/zapdriver v1.3.1 // indirect github.com/block-vision/sui-go-sdk v1.1.2 // indirect @@ -144,11 +146,12 @@ require ( github.com/cosmos/ics23/go v0.11.0 // indirect github.com/cosmos/ledger-cosmos-go v0.14.0 // indirect github.com/cpuguy83/dockercfg v0.3.2 // indirect - github.com/cpuguy83/go-md2man/v2 v2.0.6 // indirect - github.com/crate-crypto/go-eth-kzg v1.3.0 // indirect + github.com/cpuguy83/go-md2man/v2 v2.0.7 // indirect + github.com/crate-crypto/go-eth-kzg v1.4.0 // indirect github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a // indirect github.com/danieljoos/wincred v1.2.1 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/dchest/siphash v1.2.3 // indirect github.com/deckarep/golang-set/v2 v2.6.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect github.com/dgraph-io/badger/v4 v4.7.0 // indirect @@ -164,12 +167,14 @@ require ( github.com/emicklei/dot v1.6.2 // indirect github.com/emicklei/go-restful/v3 v3.12.1 // indirect github.com/esote/minmaxheap v1.0.0 // indirect - github.com/ethereum/c-kzg-4844/v2 v2.1.0 // indirect - github.com/ethereum/go-ethereum v1.16.2 // indirect + github.com/ethereum/c-kzg-4844/v2 v2.1.5 // indirect + github.com/ethereum/go-bigmodexpfix v0.0.0-20250911101455-f9e208c548ab // indirect + github.com/ethereum/go-ethereum v1.16.7 // indirect github.com/ethereum/go-verkle v0.2.2 // indirect github.com/evanphx/json-patch/v5 v5.9.0 // indirect github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f // indirect github.com/expr-lang/expr v1.17.5 // indirect + github.com/failsafe-go/failsafe-go v0.9.0 // indirect github.com/fatih/camelcase v1.0.0 // indirect github.com/fatih/color v1.18.0 // indirect github.com/fbsobreira/gotron-sdk v0.0.0-20250403083053-2943ce8c759b // indirect @@ -183,11 +188,11 @@ require ( github.com/getsentry/sentry-go v0.27.0 // indirect github.com/gin-contrib/sessions v0.0.5 // indirect github.com/gin-contrib/sse v0.1.0 // indirect - github.com/gin-gonic/gin v1.10.0 // indirect + github.com/gin-gonic/gin v1.10.1 // indirect github.com/go-asn1-ber/asn1-ber v1.5.5 // indirect github.com/go-chi/chi v1.5.5 // indirect github.com/go-errors/errors v1.4.2 // indirect - github.com/go-jose/go-jose/v4 v4.1.2 // indirect + github.com/go-jose/go-jose/v4 v4.1.3 // indirect github.com/go-json-experiment/json v0.0.0-20250223041408-d3c622f1b874 // indirect github.com/go-kit/kit v0.13.0 // indirect github.com/go-kit/log v0.2.1 // indirect @@ -211,7 +216,7 @@ require ( github.com/gofrs/flock v0.12.1 // indirect github.com/gogo/protobuf v1.3.3 // indirect github.com/golang-jwt/jwt/v4 v4.5.2 // indirect - github.com/golang-jwt/jwt/v5 v5.2.3 // indirect + github.com/golang-jwt/jwt/v5 v5.3.0 // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v1.0.0 // indirect github.com/google/btree v1.1.3 // indirect @@ -229,8 +234,8 @@ require ( github.com/gorilla/securecookie v1.1.2 // indirect github.com/gorilla/sessions v1.2.2 // indirect github.com/gorilla/websocket v1.5.3 // indirect - github.com/grafana/pyroscope-go v1.1.2 // indirect - github.com/grafana/pyroscope-go/godeltaprof v0.1.8 // indirect + github.com/grafana/pyroscope-go v1.2.7 // indirect + github.com/grafana/pyroscope-go/godeltaprof v0.1.9 // indirect github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1 // indirect github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.2 // indirect @@ -247,16 +252,18 @@ require ( github.com/hashicorp/go-plugin v1.7.0 // indirect github.com/hashicorp/go-retryablehttp v0.7.7 // indirect github.com/hashicorp/golang-lru v1.0.2 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/hashicorp/yamux v0.1.2 // indirect github.com/hasura/go-graphql-client v0.14.5 // indirect github.com/hdevalence/ed25519consensus v0.2.0 // indirect - github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4 // indirect + github.com/holiman/billy v0.0.0-20250707135307-f2f9b9aae7db // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect github.com/holiman/uint256 v1.3.2 // indirect github.com/huin/goupnp v1.3.0 // indirect github.com/iancoleman/strcase v0.3.0 // indirect github.com/imdario/mergo v0.3.16 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/influxdata/tdigest v0.0.2-0.20210216194612-fc98d27c9e8b // indirect github.com/invopop/jsonschema v0.13.0 // indirect github.com/jackc/chunkreader/v2 v2.0.1 // indirect github.com/jackc/pgconn v1.14.3 // indirect @@ -293,6 +300,7 @@ require ( github.com/mattn/go-colorable v0.1.14 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.16 // indirect + github.com/mfridman/interpolate v0.0.2 // indirect github.com/miekg/dns v1.1.65 // indirect github.com/minio/sha256-simd v1.0.1 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect @@ -338,6 +346,7 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect + github.com/pressly/goose/v3 v3.26.0 // indirect github.com/prometheus/client_golang v1.23.0 // indirect github.com/prometheus/client_model v0.6.2 // indirect github.com/prometheus/common v0.65.0 // indirect @@ -355,7 +364,7 @@ require ( github.com/sasha-s/go-deadlock v0.3.5 // indirect github.com/scylladb/go-reflectx v1.0.1 // indirect github.com/segmentio/ksuid v1.0.4 // indirect - github.com/sethvargo/go-retry v0.2.4 // indirect + github.com/sethvargo/go-retry v0.3.0 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect github.com/shirou/gopsutil/v3 v3.24.3 // indirect github.com/shirou/gopsutil/v4 v4.25.9 // indirect @@ -365,18 +374,23 @@ require ( github.com/slack-go/slack v0.15.0 // indirect github.com/smartcontractkit/chainlink-aptos v0.0.0-20251027153600-2b072ff3618e // indirect github.com/smartcontractkit/chainlink-automation v0.8.1 // indirect + github.com/smartcontractkit/chainlink-ccip/ccv/chains/evm v0.0.0-20251127040717-30244f57ea7a // indirect github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250912190424-fd2e35d7deb5 // indirect + github.com/smartcontractkit/chainlink-ccv v0.0.0-20251215155942-4daf59a09b5a // indirect github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10 // indirect - github.com/smartcontractkit/chainlink-data-streams v0.1.6 // indirect - github.com/smartcontractkit/chainlink-deployments-framework v0.64.0 // indirect - github.com/smartcontractkit/chainlink-evm v0.3.4-0.20251029010119-b2ed6162042f // indirect - github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20251022075638-49d961001d1b // indirect + github.com/smartcontractkit/chainlink-data-streams v0.1.9 // indirect + github.com/smartcontractkit/chainlink-deployments-framework v0.70.0 // indirect + github.com/smartcontractkit/chainlink-evm v0.3.4-0.20251210110629-10c56e8d2cec // indirect + github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20251211123524-f0c4fe7cfc0a // indirect github.com/smartcontractkit/chainlink-feeds v0.1.2-0.20250227211209-7cd000095135 // indirect github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-20250818175541-3389ac08a563 // indirect - github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20251021173435-e86785845942 // indirect - github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20251020150604-8ab84f7bad1a // indirect + github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20251210101658-1c5c8e4c4f15 // indirect + github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20251206233640-139a324649d9 // indirect github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20251021173435-e86785845942 // indirect github.com/smartcontractkit/chainlink-protos/billing/go v0.0.0-20251024234028-0988426d98f4 // indirect + github.com/smartcontractkit/chainlink-protos/chainlink-ccv/committee-verifier v0.0.0-20251211142334-5c3421fe2c8d // indirect + github.com/smartcontractkit/chainlink-protos/chainlink-ccv/message-discovery v0.0.0-20251211142334-5c3421fe2c8d // indirect + github.com/smartcontractkit/chainlink-protos/chainlink-ccv/verifier v0.0.0-20251211142334-5c3421fe2c8d // indirect github.com/smartcontractkit/chainlink-protos/job-distributor v0.17.0 // indirect github.com/smartcontractkit/chainlink-protos/linking-service/go v0.0.0-20251002192024-d2ad9222409b // indirect github.com/smartcontractkit/chainlink-protos/orchestrator v0.10.0 // indirect @@ -384,15 +398,15 @@ require ( github.com/smartcontractkit/chainlink-protos/storage-service v0.3.0 // indirect github.com/smartcontractkit/chainlink-protos/svr v1.1.0 // indirect github.com/smartcontractkit/chainlink-protos/workflows/go v0.0.0-20251025021331-aa7746850cc4 // indirect - github.com/smartcontractkit/chainlink-sui v0.0.0-20251105220250-f8d7f06e3b8d // indirect - github.com/smartcontractkit/chainlink-ton v0.0.0-20251113211653-082bd18d77bb // indirect + github.com/smartcontractkit/chainlink-sui v0.0.0-20251205161630-88314452254c // indirect + github.com/smartcontractkit/chainlink-ton v0.0.0-20251219221624-54a39a031e62 // indirect github.com/smartcontractkit/chainlink-tron/relayer v0.0.11-0.20251014143056-a0c6328c91e9 // indirect github.com/smartcontractkit/freeport v0.1.3-0.20250716200817-cb5dfd0e369e // indirect github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 // indirect - github.com/smartcontractkit/mcms v0.30.2-0.20251105142805-988f5319936f // indirect + github.com/smartcontractkit/mcms v0.30.2 // indirect github.com/smartcontractkit/smdkg v0.0.0-20251029093710-c38905e58aeb // indirect github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20241009055228-33d0c0bf38de // indirect - github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20250624150019-e49f7e125e6b // indirect + github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20251120172354-e8ec0386b06c // indirect github.com/smartcontractkit/wsrpc v0.8.5-0.20250502134807-c57d3d995945 // indirect github.com/spf13/cast v1.10.0 // indirect github.com/spf13/cobra v1.10.1 // indirect @@ -400,7 +414,7 @@ require ( github.com/stephenlacy/go-ethereum-hdwallet v0.0.0-20230913225845-a4fa94429863 // indirect github.com/streamingfast/logging v0.0.0-20230608130331-f22c91403091 // indirect github.com/stretchr/objx v0.5.2 // indirect - github.com/supranational/blst v0.3.14 // indirect + github.com/supranational/blst v0.3.16-0.20250831170142-f48500c1fdbe // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect github.com/tendermint/go-amino v0.16.0 // indirect github.com/theodesp/go-heaps v0.0.0-20190520121037-88e35354fe0a // indirect @@ -414,7 +428,7 @@ require ( github.com/ugorji/go/codec v1.2.12 // indirect github.com/umbracle/ethgo v0.1.3 // indirect github.com/umbracle/fastrlp v0.0.0-20220527094140-59d5dd30e722 // indirect - github.com/urfave/cli/v2 v2.27.6 // indirect + github.com/urfave/cli/v2 v2.27.7 // indirect github.com/valyala/fastjson v1.6.4 // indirect github.com/vektah/gqlparser/v2 v2.5.14 // indirect github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect @@ -458,21 +472,21 @@ require ( go.uber.org/ratelimit v0.3.1 // indirect golang.org/x/arch v0.11.0 // indirect golang.org/x/crypto v0.45.0 // indirect - golang.org/x/mod v0.29.0 // indirect + golang.org/x/mod v0.31.0 // indirect golang.org/x/net v0.47.0 // indirect - golang.org/x/oauth2 v0.30.0 // indirect - golang.org/x/sys v0.38.0 // indirect - golang.org/x/telemetry v0.0.0-20251008203120-078029d740a8 // indirect + golang.org/x/oauth2 v0.32.0 // indirect + golang.org/x/sys v0.39.0 // indirect + golang.org/x/telemetry v0.0.0-20251208220230-2638a1023523 // indirect golang.org/x/term v0.37.0 // indirect golang.org/x/time v0.12.0 // indirect - golang.org/x/tools v0.38.0 // indirect + golang.org/x/tools v0.39.0 // indirect golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect gonum.org/v1/gonum v0.16.0 // indirect google.golang.org/genproto v0.0.0-20250505200425-f936aa4a68b2 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20251007200510-49b9836ed3ff // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20251002232023-7c0ddcbb5797 // indirect - google.golang.org/grpc v1.76.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20251022142026-3a174f9686a8 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20251022142026-3a174f9686a8 // indirect + google.golang.org/grpc v1.77.0 // indirect google.golang.org/protobuf v1.36.10 // indirect gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect diff --git a/integration-tests/go.sum b/integration-tests/go.sum index 667556a2a..924ea8148 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -76,8 +76,8 @@ github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c/go.mod h1:xomTg6 github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 h1:mFRzDkZVAjdal+s7s0MwaRv9igoPqLRdzOLzw/8Xvq8= github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0= -github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= +github.com/BurntSushi/toml v1.5.0 h1:W5quZX/G/csjUnuI8SUYlsHs9M38FC7znL0lIO+DvMg= +github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= @@ -100,8 +100,10 @@ github.com/NethermindEth/starknet.go v0.8.0 h1:mGh7qDWrvuXJPcgGJP31DpifzP6+Ef2gt github.com/NethermindEth/starknet.go v0.8.0/go.mod h1:slNA8PxtxA/0LQv0FwHnL3lHFDNhVZfTK6U2gjVb7l8= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= -github.com/VictoriaMetrics/fastcache v1.12.2 h1:N0y9ASrJ0F6h0QaC3o6uJb3NIZ9VKLjCM7NQbSmF7WI= -github.com/VictoriaMetrics/fastcache v1.12.2/go.mod h1:AmC+Nzz1+3G2eCPapF6UcsnkThDcMsQicp4xDukwJYI= +github.com/ProjectZKM/Ziren/crates/go-runtime/zkvm_runtime v0.0.0-20251001021608-1fe7b43fc4d6 h1:1zYrtlhrZ6/b6SAjLSfKzWtdgqK0U+HtH/VcBWh1BaU= +github.com/ProjectZKM/Ziren/crates/go-runtime/zkvm_runtime v0.0.0-20251001021608-1fe7b43fc4d6/go.mod h1:ioLG6R+5bUSO1oeGSDxOV3FADARuMoytZCSX6MEMQkI= +github.com/VictoriaMetrics/fastcache v1.13.0 h1:AW4mheMR5Vd9FkAPUv+NH6Nhw+fmbTMGMsNAoA/+4G0= +github.com/VictoriaMetrics/fastcache v1.13.0/go.mod h1:hHXhl4DA2fTL2HTZDJFXWgW0LNjo6B+4aj2Wmng3TjU= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/XSAM/otelsql v0.37.0 h1:ya5RNw028JW0eJW8Ma4AmoKxAYsJSGuNVbC7F1J457A= @@ -116,13 +118,12 @@ github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b h1:mimo19zliBX/vS github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b/go.mod h1:fvzegU4vN3H1qMT+8wDmzjAcDONcgo2/SZ/TyfdUOFs= github.com/alexbrainman/sspi v0.0.0-20210105120005-909beea2cc74 h1:Kk6a4nehpJ3UuJRqlA3JxYxBZEqCeOmATOvrbT4p9RA= github.com/alexbrainman/sspi v0.0.0-20210105120005-909beea2cc74/go.mod h1:cEWa1LVoE5KvSD9ONXsZrj0z6KqySlCCNKHlLzbqAt4= -github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/allegro/bigcache v1.2.1 h1:hg1sY1raCwic3Vnsvje6TT7/pnZba83LeFck5NrFKSc= github.com/allegro/bigcache v1.2.1/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= -github.com/andybalholm/brotli v1.1.1 h1:PR2pgnyFznKEugtsUo0xLdDop5SKXd5Qf5ysW+7XdTA= -github.com/andybalholm/brotli v1.1.1/go.mod h1:05ib4cKhjx3OQYUY22hTVd34Bc8upXjOLL2rKwwZBoA= +github.com/andybalholm/brotli v1.2.0 h1:ukwgCxwYrmACq68yiUqwIWnGY0cTPox/M94sVwToPjQ= +github.com/andybalholm/brotli v1.2.0/go.mod h1:rzTDkvFWvIrjDXZHkuS16NPggd91W3kUSvPlQ1pLaKY= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/arrow-go/v18 v18.3.1 h1:oYZT8FqONiK74JhlH3WKVv+2NKYoyZ7C2ioD4Dj3ixk= github.com/apache/arrow-go/v18 v18.3.1/go.mod h1:12QBya5JZT6PnBihi5NJTzbACrDGXYkrgjujz3MRQXU= @@ -144,44 +145,48 @@ github.com/avast/retry-go/v4 v4.6.1 h1:VkOLRubHdisGrHnTu89g08aQEWEgRU7LVEop3GbIc github.com/avast/retry-go/v4 v4.6.1/go.mod h1:V6oF8njAwxJ5gRo1Q7Cxab24xs5NCWZBeaHHBklR8mA= github.com/awalterschulze/gographviz v2.0.3+incompatible h1:9sVEXJBJLwGX7EQVhLm2elIKCm7P2YHFC8v6096G09E= github.com/awalterschulze/gographviz v2.0.3+incompatible/go.mod h1:GEV5wmg4YquNw7v1kkyoX9etIk8yVmXj+AkDHuuETHs= -github.com/aws/aws-sdk-go-v2 v1.38.1 h1:j7sc33amE74Rz0M/PoCpsZQ6OunLqys/m5antM0J+Z8= -github.com/aws/aws-sdk-go-v2 v1.38.1/go.mod h1:9Q0OoGQoboYIAJyslFyF1f5K1Ryddop8gqMhWx/n4Wg= -github.com/aws/aws-sdk-go-v2/config v1.29.14 h1:f+eEi/2cKCg9pqKBoAIwRGzVb70MRKqWX4dg1BDcSJM= -github.com/aws/aws-sdk-go-v2/config v1.29.14/go.mod h1:wVPHWcIFv3WO89w0rE10gzf17ZYy+UVS1Geq8Iei34g= -github.com/aws/aws-sdk-go-v2/credentials v1.17.67 h1:9KxtdcIA/5xPNQyZRgUSpYOE6j9Bc4+D7nZua0KGYOM= -github.com/aws/aws-sdk-go-v2/credentials v1.17.67/go.mod h1:p3C44m+cfnbv763s52gCqrjaqyPikj9Sg47kUVaNZQQ= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30 h1:x793wxmUWVDhshP8WW2mlnXuFrO4cOd3HLBroh1paFw= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30/go.mod h1:Jpne2tDnYiFascUEs2AWHJL9Yp7A5ZVy3TNyxaAjD6M= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.4 h1:IdCLsiiIj5YJ3AFevsewURCPV+YWUlOW8JiPhoAy8vg= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.4/go.mod h1:l4bdfCD7XyyZA9BolKBo1eLqgaJxl0/x91PL4Yqe0ao= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.4 h1:j7vjtr1YIssWQOMeOWRbh3z8g2oY/xPjnZH2gLY4sGw= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.4/go.mod h1:yDmJgqOiH4EA8Hndnv4KwAo8jCGTSnM5ASG1nBI+toA= -github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d2KyU5X/BZxjOkRo= -github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3/go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 h1:eAh2A4b5IzM/lum78bZ590jy36+d/aFLgKF/4Vd1xPE= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3/go.mod h1:0yKJC/kb8sAnmlYa6Zs3QVYqaC8ug2AbnNChv5Ox3uA= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15 h1:dM9/92u2F1JbDaGooxTq18wmmFzbJRfXfVfy96/1CXM= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15/go.mod h1:SwFBy2vjtA0vZbjjaFtfN045boopadnoVPhu4Fv66vY= +github.com/aws/aws-sdk-go-v2 v1.39.6 h1:2JrPCVgWJm7bm83BDwY5z8ietmeJUbh3O2ACnn+Xsqk= +github.com/aws/aws-sdk-go-v2 v1.39.6/go.mod h1:c9pm7VwuW0UPxAEYGyTmyurVcNrbF6Rt/wixFqDhcjE= +github.com/aws/aws-sdk-go-v2/config v1.31.17 h1:QFl8lL6RgakNK86vusim14P2k8BFSxjvUkcWLDjgz9Y= +github.com/aws/aws-sdk-go-v2/config v1.31.17/go.mod h1:V8P7ILjp/Uef/aX8TjGk6OHZN6IKPM5YW6S78QnRD5c= +github.com/aws/aws-sdk-go-v2/credentials v1.18.21 h1:56HGpsgnmD+2/KpG0ikvvR8+3v3COCwaF4r+oWwOeNA= +github.com/aws/aws-sdk-go-v2/credentials v1.18.21/go.mod h1:3YELwedmQbw7cXNaII2Wywd+YY58AmLPwX4LzARgmmA= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.13 h1:T1brd5dR3/fzNFAQch/iBKeX07/ffu/cLu+q+RuzEWk= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.13/go.mod h1:Peg/GBAQ6JDt+RoBf4meB1wylmAipb7Kg2ZFakZTlwk= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.13 h1:a+8/MLcWlIxo1lF9xaGt3J/u3yOZx+CdSveSNwjhD40= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.13/go.mod h1:oGnKwIYZ4XttyU2JWxFrwvhF6YKiK/9/wmE3v3Iu9K8= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.13 h1:HBSI2kDkMdWz4ZM7FjwE7e/pWDEZ+nR95x8Ztet1ooY= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.13/go.mod h1:YE94ZoDArI7awZqJzBAZ3PDD2zSfuP7w6P2knOzIn8M= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.4 h1:WKuaxf++XKWlHWu9ECbMlha8WOEGm0OUEZqm4K/Gcfk= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.4/go.mod h1:ZWy7j6v1vWGmPReu0iSGvRiise4YI5SkR3OHKTZ6Wuc= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.3 h1:x2Ibm/Af8Fi+BH+Hsn9TXGdT+hKbDd5XOTZxTMxDk7o= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.3/go.mod h1:IW1jwyrQgMdhisceG8fQLmQIydcT/jWY21rFhzgaKwo= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.13 h1:kDqdFvMY4AtKoACfzIGD8A0+hbT41KTKF//gq7jITfM= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.13/go.mod h1:lmKuogqSU3HzQCwZ9ZtcqOc5XGMqtDK7OIc2+DxiUEg= +github.com/aws/aws-sdk-go-v2/service/kms v1.47.1 h1:6+C0RoGF4HJQALrsecOXN7cm/l5rgNHCw2xbcvFgpH4= +github.com/aws/aws-sdk-go-v2/service/kms v1.47.1/go.mod h1:VJcNH6BLr+3VJwinRKdotLOMglHO8mIKlD3ea5c7hbw= github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.34.2 h1:Rrqru2wYkKQCS2IM5/JrgKUQIoNTqA6y/iuxkjzxC6M= github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.34.2/go.mod h1:QuCURO98Sqee2AXmqDNxKXYFm2OEDAVAPApMqO0Vqnc= -github.com/aws/aws-sdk-go-v2/service/sso v1.25.3 h1:1Gw+9ajCV1jogloEv1RRnvfRFia2cL6c9cuKV2Ps+G8= -github.com/aws/aws-sdk-go-v2/service/sso v1.25.3/go.mod h1:qs4a9T5EMLl/Cajiw2TcbNt2UNo/Hqlyp+GiuG4CFDI= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.1 h1:hXmVKytPfTy5axZ+fYbR5d0cFmC3JvwLm5kM83luako= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.1/go.mod h1:MlYRNmYu/fGPoxBQVvBYr9nyr948aY/WLUvwBMBJubs= -github.com/aws/aws-sdk-go-v2/service/sts v1.33.19 h1:1XuUZ8mYJw9B6lzAkXhqHlJd/XvaX32evhproijJEZY= -github.com/aws/aws-sdk-go-v2/service/sts v1.33.19/go.mod h1:cQnB8CUnxbMU82JvlqjKR2HBOm3fe9pWorWBza6MBJ4= +github.com/aws/aws-sdk-go-v2/service/sso v1.30.1 h1:0JPwLz1J+5lEOfy/g0SURC9cxhbQ1lIMHMa+AHZSzz0= +github.com/aws/aws-sdk-go-v2/service/sso v1.30.1/go.mod h1:fKvyjJcz63iL/ftA6RaM8sRCtN4r4zl4tjL3qw5ec7k= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.5 h1:OWs0/j2UYR5LOGi88sD5/lhN6TDLG6SfA7CqsQO9zF0= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.5/go.mod h1:klO+ejMvYsB4QATfEOIXk8WAEwN4N0aBfJpvC+5SZBo= +github.com/aws/aws-sdk-go-v2/service/sts v1.39.1 h1:mLlUgHn02ue8whiR4BmxxGJLR2gwU6s6ZzJ5wDamBUs= +github.com/aws/aws-sdk-go-v2/service/sts v1.39.1/go.mod h1:E19xDjpzPZC7LS2knI9E6BaRFDK43Eul7vd6rSq2HWk= github.com/aws/constructs-go/constructs/v10 v10.4.2 h1:+hDLTsFGLJmKIn0Dg20vWpKBrVnFrEWYgTEY5UiTEG8= github.com/aws/constructs-go/constructs/v10 v10.4.2/go.mod h1:cXsNCKDV+9eR9zYYfwy6QuE4uPFp6jsq6TtH1MwBx9w= github.com/aws/jsii-runtime-go v1.104.0 h1:651Sh6J2FtatfnVzlOQ3/Ye1WWPAseZ6E/tSQxEKdSI= github.com/aws/jsii-runtime-go v1.104.0/go.mod h1:7ZmQXxV0AAhhvv/GaHX4n6zbgA1tSRVdnQYAJbIhXHk= -github.com/aws/smithy-go v1.22.5 h1:P9ATCXPMb2mPjYBgueqJNCA5S9UfktsW0tTxi+a7eqw= -github.com/aws/smithy-go v1.22.5/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI= +github.com/aws/smithy-go v1.23.2 h1:Crv0eatJUQhaManss33hS5r40CG3ZFH+21XSkqMrIUM= +github.com/aws/smithy-go v1.23.2/go.mod h1:LEj2LM3rBRQJxPZTB4KuzZkaZYnZPnvgIhb4pu07mx0= github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59 h1:WWB576BN5zNSZc/M9d/10pqEx5VHNhaQ/yOVAkmj5Yo= github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I= github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk= github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg= github.com/barkimedes/go-deepcopy v0.0.0-20220514131651-17c30cfc62df h1:GSoSVRLoBaFpOOds6QyY1L8AX7uoY+Ln3BHc22W40X0= github.com/barkimedes/go-deepcopy v0.0.0-20220514131651-17c30cfc62df/go.mod h1:hiVxq5OP2bUGBRNS3Z/bt/reCLFNbdcST6gISi1fiOM= +github.com/beevik/ntp v1.5.0 h1:y+uj/JjNwlY2JahivxYvtmv4ehfi3h74fAuABB9ZSM4= +github.com/beevik/ntp v1.5.0/go.mod h1:mJEhBrwT76w9D+IfOEGvuzyuudiW9E52U2BaTrMOYow= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -192,8 +197,8 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bits-and-blooms/bitset v1.20.0 h1:2F+rfL86jE2d/bmw7OhqUg2Sj/1rURkBn3MdfoPyRVU= -github.com/bits-and-blooms/bitset v1.20.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/bits-and-blooms/bitset v1.24.0 h1:H4x4TuulnokZKvHLfzVRTHJfFfnHEeSYJizujEZvmAM= +github.com/bits-and-blooms/bitset v1.24.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= @@ -258,7 +263,6 @@ github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA github.com/cespare/cp v1.1.1 h1:nCb6ZLdB7NRaqsm91JtQTAme2SKJzXVsdPIPkyJr1MU= github.com/cespare/cp v1.1.1/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chai2010/gettext-go v1.0.2 h1:1Lwwip6Q2QGsAdl/ZKPCwTe9fe0CjlUbqj5bFNSjIRk= @@ -348,16 +352,17 @@ github.com/cosmos/ledger-cosmos-go v0.14.0/go.mod h1:E07xCWSBl3mTGofZ2QnL4cIUzMb github.com/cpuguy83/dockercfg v0.3.2 h1:DlJTyZGBDlXqUZ2Dk2Q3xHs/FtnooJJVaad2S9GKorA= github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.6 h1:XJtiaUW6dEEqVuZiMTn1ldk455QWwEIsMIJlo5vtkx0= github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= -github.com/crate-crypto/go-eth-kzg v1.3.0 h1:05GrhASN9kDAidaFJOda6A4BEvgvuXbazXg/0E3OOdI= -github.com/crate-crypto/go-eth-kzg v1.3.0/go.mod h1:J9/u5sWfznSObptgfa92Jq8rTswn6ahQWEuiLHOjCUI= +github.com/cpuguy83/go-md2man/v2 v2.0.7 h1:zbFlGlXEAKlwXpmvle3d8Oe3YnkKIK4xSRTd3sHPnBo= +github.com/cpuguy83/go-md2man/v2 v2.0.7/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= +github.com/crate-crypto/go-eth-kzg v1.4.0 h1:WzDGjHk4gFg6YzV0rJOAsTK4z3Qkz5jd4RE3DAvPFkg= +github.com/crate-crypto/go-eth-kzg v1.4.0/go.mod h1:J9/u5sWfznSObptgfa92Jq8rTswn6ahQWEuiLHOjCUI= github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a h1:W8mUrRp6NOVl3J+MYp5kPMoUZPp7aOYHtaua31lwRHg= github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a/go.mod h1:sTwzHBvIzm2RfVCGNEBZgRyjwK40bVoun3ZnGOCafNM= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= -github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= +github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s= +github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE= github.com/cucumber/gherkin/go/v26 v26.2.0 h1:EgIjePLWiPeslwIWmNQ3XHcypPsWAHoMCz/YEBKP4GI= github.com/cucumber/gherkin/go/v26 v26.2.0/go.mod h1:t2GAPnB8maCT4lkHL99BDCVNzCh1d7dBhCLt150Nr/0= github.com/cucumber/godog v0.15.1 h1:rb/6oHDdvVZKS66hrhpjFQFHjthFSrQBCOI1LwshNTI= @@ -374,6 +379,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dchest/siphash v1.2.3 h1:QXwFc8cFOR2dSa/gE6o/HokBMWtLUaNDVd+22aKHeEA= +github.com/dchest/siphash v1.2.3/go.mod h1:0NvQU092bT0ipiFN++/rXm69QG9tVxLAlQHIXMPAkHc= github.com/deckarep/golang-set/v2 v2.6.0 h1:XfcQbWM1LlMB8BsJ8N9vW5ehnnPVIw0je80NsVHagjM= github.com/deckarep/golang-set/v2 v2.6.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= @@ -424,10 +431,12 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.m github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/esote/minmaxheap v1.0.0 h1:rgA7StnXXpZG6qlM0S7pUmEv1KpWe32rYT4x8J8ntaA= github.com/esote/minmaxheap v1.0.0/go.mod h1:Ln8+i7fS1k3PLgZI2JAo0iA1as95QnIYiGCrqSJ5FZk= -github.com/ethereum/c-kzg-4844/v2 v2.1.0 h1:gQropX9YFBhl3g4HYhwE70zq3IHFRgbbNPw0Shwzf5w= -github.com/ethereum/c-kzg-4844/v2 v2.1.0/go.mod h1:TC48kOKjJKPbN7C++qIgt0TJzZ70QznYR7Ob+WXl57E= -github.com/ethereum/go-ethereum v1.16.2 h1:VDHqj86DaQiMpnMgc7l0rwZTg0FRmlz74yupSG5SnzI= -github.com/ethereum/go-ethereum v1.16.2/go.mod h1:X5CIOyo8SuK1Q5GnaEizQVLHT/DfsiGWuNeVdQcEMNA= +github.com/ethereum/c-kzg-4844/v2 v2.1.5 h1:aVtoLK5xwJ6c5RiqO8g8ptJ5KU+2Hdquf6G3aXiHh5s= +github.com/ethereum/c-kzg-4844/v2 v2.1.5/go.mod h1:u59hRTTah4Co6i9fDWtiCjTrblJv0UwsqZKCc0GfgUs= +github.com/ethereum/go-bigmodexpfix v0.0.0-20250911101455-f9e208c548ab h1:rvv6MJhy07IMfEKuARQ9TKojGqLVNxQajaXEp/BoqSk= +github.com/ethereum/go-bigmodexpfix v0.0.0-20250911101455-f9e208c548ab/go.mod h1:IuLm4IsPipXKF7CW5Lzf68PIbZ5yl7FFd74l/E0o9A8= +github.com/ethereum/go-ethereum v1.16.7 h1:qeM4TvbrWK0UC0tgkZ7NiRsmBGwsjqc64BHo20U59UQ= +github.com/ethereum/go-ethereum v1.16.7/go.mod h1:Fs6QebQbavneQTYcA39PEKv2+zIjX7rPUZ14DER46wk= github.com/ethereum/go-verkle v0.2.2 h1:I2W0WjnrFUIzzVPwm8ykY+7pL2d4VhlsePn4j7cnFk8= github.com/ethereum/go-verkle v0.2.2/go.mod h1:M3b90YRnzqKyyzBEWJGqj8Qff4IDeXnzFw0P9bFw3uk= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= @@ -438,6 +447,8 @@ github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f h1:Wl78ApPPB2 github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f/go.mod h1:OSYXu++VVOHnXeitef/D8n/6y4QV8uLHSFXX4NeXMGc= github.com/expr-lang/expr v1.17.5 h1:i1WrMvcdLF249nSNlpQZN1S6NXuW9WaOfF5tPi3aw3k= github.com/expr-lang/expr v1.17.5/go.mod h1:8/vRC7+7HBzESEqt5kKpYXxrxkr31SaO8r40VO/1IT4= +github.com/failsafe-go/failsafe-go v0.9.0 h1:w0g7iv48RpQvV3UH1VlgUnLx9frQfCwI7ljnJzqEhYg= +github.com/failsafe-go/failsafe-go v0.9.0/go.mod h1:sX5TZ4HrMLYSzErWeckIHRZWgZj9PbKMAEKOVLFWtfM= github.com/fatih/camelcase v1.0.0 h1:hxNvNX/xYBp0ovncs8WyWZrOrpBNub/JfaMvbURyft8= github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= @@ -489,8 +500,8 @@ github.com/gin-contrib/size v0.0.0-20230212012657-e14a14094dc4 h1:Z9J0PVIt1PuibO github.com/gin-contrib/size v0.0.0-20230212012657-e14a14094dc4/go.mod h1:CEPcgZiz8998l9E8fDm16h8UfHRL7b+5oG0j/0koeVw= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.10.0 h1:nTuyha1TYqgedzytsKYqna+DfLos46nTv2ygFy86HFU= -github.com/gin-gonic/gin v1.10.0/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y= +github.com/gin-gonic/gin v1.10.1 h1:T0ujvqyCSqRopADpgPgiTT63DUQVSfojyME59Ei63pQ= +github.com/gin-gonic/gin v1.10.1/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y= github.com/go-asn1-ber/asn1-ber v1.5.5 h1:MNHlNMBDgEKD4TcKr36vQN68BA00aDfjIt3/bD50WnA= github.com/go-asn1-ber/asn1-ber v1.5.5/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= github.com/go-chi/chi v1.5.5 h1:vOB/HbEMt9QqBqErz07QehcOKHaWFtuj87tTDVz2qXE= @@ -500,8 +511,8 @@ github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3Bop github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-jose/go-jose/v4 v4.1.2 h1:TK/7NqRQZfgAh+Td8AlsrvtPoUyiHh0LqVvokh+1vHI= -github.com/go-jose/go-jose/v4 v4.1.2/go.mod h1:22cg9HWM1pOlnRiY+9cQYJ9XHmya1bYW8OeDM6Ku6Oo= +github.com/go-jose/go-jose/v4 v4.1.3 h1:CVLmWDhDVRa6Mi/IgCgaopNosCaHz7zrMeF9MlZRkrs= +github.com/go-jose/go-jose/v4 v4.1.3/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08= github.com/go-json-experiment/json v0.0.0-20250223041408-d3c622f1b874 h1:F8d1AJ6M9UQCavhwmO6ZsrYLfG8zVFWfEfMS2MXPkSY= github.com/go-json-experiment/json v0.0.0-20250223041408-d3c622f1b874/go.mod h1:TiCD2a1pcmjd7YnhGH0f/zKNcCD06B029pHhzV23c2M= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= @@ -544,8 +555,9 @@ github.com/go-playground/validator/v10 v10.28.0 h1:Q7ibns33JjyW48gHkuFT91qX48KG0 github.com/go-playground/validator/v10 v10.28.0/go.mod h1:GoI6I1SjPBh9p7ykNE/yj3fFYbyDOpwMn5KXd+m2hUU= github.com/go-resty/resty/v2 v2.16.5 h1:hBKqmWrr7uRc3euHVqmh1HTHcKn99Smr7o5spptdhTM= github.com/go-resty/resty/v2 v2.16.5/go.mod h1:hkJtXbA2iKHzJheXYvQ8snQES5ZLGKMwQ07xAwp/fiA= -github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= +github.com/go-sql-driver/mysql v1.9.3 h1:U/N249h2WzJ3Ukj8SowVFjdtZKfu9vlLZxjPXV1aweo= +github.com/go-sql-driver/mysql v1.9.3/go.mod h1:qn46aNg1333BRMNU69Lq93t8du/dwxI64Gl8i5p1WMU= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= @@ -575,8 +587,8 @@ github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0 github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= github.com/golang-jwt/jwt/v4 v4.5.2 h1:YtQM7lnr8iZ+j5q71MGKkNw9Mn7AjHM68uc9g5fXeUI= github.com/golang-jwt/jwt/v4 v4.5.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/golang-jwt/jwt/v5 v5.2.3 h1:kkGXqQOBSDDWRhWNXTFpqGSCMyh/PLnqUvMGJPDJDs0= -github.com/golang-jwt/jwt/v5 v5.2.3/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= +github.com/golang-jwt/jwt/v5 v5.3.0 h1:pv4AsKCKKZuqlgs5sUmn4x8UlGa0kEVt/puTpKx9vvo= +github.com/golang-jwt/jwt/v5 v5.3.0/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -695,10 +707,10 @@ github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/grafana/pyroscope-go v1.1.2 h1:7vCfdORYQMCxIzI3NlYAs3FcBP760+gWuYWOyiVyYx8= -github.com/grafana/pyroscope-go v1.1.2/go.mod h1:HSSmHo2KRn6FasBA4vK7BMiQqyQq8KSuBKvrhkXxYPU= -github.com/grafana/pyroscope-go/godeltaprof v0.1.8 h1:iwOtYXeeVSAeYefJNaxDytgjKtUuKQbJqgAIjlnicKg= -github.com/grafana/pyroscope-go/godeltaprof v0.1.8/go.mod h1:2+l7K7twW49Ct4wFluZD3tZ6e0SjanjcUUBPVD/UuGU= +github.com/grafana/pyroscope-go v1.2.7 h1:VWBBlqxjyR0Cwk2W6UrE8CdcdD80GOFNutj0Kb1T8ac= +github.com/grafana/pyroscope-go v1.2.7/go.mod h1:o/bpSLiJYYP6HQtvcoVKiE9s5RiNgjYTj1DhiddP2Pc= +github.com/grafana/pyroscope-go/godeltaprof v0.1.9 h1:c1Us8i6eSmkW+Ez05d3co8kasnuOY813tbMN8i/a3Og= +github.com/grafana/pyroscope-go/godeltaprof v0.1.9/go.mod h1:2+l7K7twW49Ct4wFluZD3tZ6e0SjanjcUUBPVD/UuGU= github.com/graph-gophers/dataloader v5.0.0+incompatible h1:R+yjsbrNq1Mo3aPG+Z/EKYrXrXXUNJHOgbRt+U6jOug= github.com/graph-gophers/dataloader v5.0.0+incompatible/go.mod h1:jk4jk0c5ZISbKaMe8WsVopGB5/15GvGHMdMdPtwlRp4= github.com/graph-gophers/graphql-go v1.5.0 h1:fDqblo50TEpD0LY7RXk/LFVYEVqo3+tXMNMPSVXA1yc= @@ -771,8 +783,8 @@ github.com/hasura/go-graphql-client v0.14.5 h1:M9HxxGLCcDZnxJGYyWXAzDYEpommgjW+s github.com/hasura/go-graphql-client v0.14.5/go.mod h1:jfSZtBER3or+88Q9vFhWHiFMPppfYILRyl+0zsgPIIw= github.com/hdevalence/ed25519consensus v0.2.0 h1:37ICyZqdyj0lAZ8P4D1d1id3HqbbG1N3iBb1Tb4rdcU= github.com/hdevalence/ed25519consensus v0.2.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= -github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4 h1:X4egAf/gcS1zATw6wn4Ej8vjuVGxeHdan+bRb2ebyv4= -github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4/go.mod h1:5GuXa7vkL8u9FkFuWdVvfR5ix8hRB7DbOAaYULamFpc= +github.com/holiman/billy v0.0.0-20250707135307-f2f9b9aae7db h1:IZUYC/xb3giYwBLMnr8d0TGTzPKFGNTCGgGLoyeX330= +github.com/holiman/billy v0.0.0-20250707135307-f2f9b9aae7db/go.mod h1:xTEYN9KCHxuYHs+NmrmzFcnvHMzLLNiGFafCb1n3Mfg= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/holiman/uint256 v1.3.2 h1:a9EgMPSC1AAaj1SZL5zIQD3WbwTuHrMGOerLjGmM/TA= @@ -799,6 +811,8 @@ github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c h1:qSH github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/influxdata/line-protocol v0.0.0-20210311194329-9aa0e372d097 h1:vilfsDSy7TDxedi9gyBkMvAirat/oRcL0lFdJBf6tdM= github.com/influxdata/line-protocol v0.0.0-20210311194329-9aa0e372d097/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= +github.com/influxdata/tdigest v0.0.2-0.20210216194612-fc98d27c9e8b h1:i44CesU68ZBRvtCjBi3QSosCIKrjmMbYlQMFAwVLds4= +github.com/influxdata/tdigest v0.0.2-0.20210216194612-fc98d27c9e8b/go.mod h1:Z0kXnxzbTC2qrx4NaIzYkE1k66+6oEDQTvL95hQFh5Y= github.com/invopop/jsonschema v0.13.0 h1:KvpoAJWEjR3uD9Kbm2HWJmqsEaHt8lBUpd0qHcIi21E= github.com/invopop/jsonschema v0.13.0/go.mod h1:ffZ5Km5SWWRAIN6wbDXItl95euhFz2uON45H2qjYt+0= github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= @@ -1048,6 +1062,8 @@ github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+ github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4= +github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls= github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= github.com/neelance/sourcemap v0.0.0-20200213170602-2833bce08e4c/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= @@ -1139,8 +1155,8 @@ github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndr github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU= github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/pressly/goose/v3 v3.21.1 h1:5SSAKKWej8LVVzNLuT6KIvP1eFDuPvxa+B6H0w78buQ= -github.com/pressly/goose/v3 v3.21.1/go.mod h1:sqthmzV8PitchEkjecFJII//l43dLOCzfWh8pHEe+vE= +github.com/pressly/goose/v3 v3.26.0 h1:KJakav68jdH0WDvoAcj8+n61WqOIaPGgH0bJWS6jpmM= +github.com/pressly/goose/v3 v3.26.0/go.mod h1:4hC1KrritdCxtuFsqgs1R4AU5bWtTAf+cnWvfhf2DNY= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= @@ -1175,6 +1191,8 @@ github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5X github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/regen-network/protobuf v1.3.3-alpha.regen.1 h1:OHEc+q5iIAXpqiqFKeLpu5NwTIkVXUs48vFMwzqpqY4= github.com/regen-network/protobuf v1.3.3-alpha.regen.1/go.mod h1:2DjTFR1HhMQhiWC5sZ4OhQ3+NtdbZ6oBDKQwq5Ou+FI= +github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= +github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/riferrei/srclient v0.5.4 h1:dfwyR5u23QF7beuVl2WemUY2KXh5+Sc4DHKyPXBNYuc= github.com/riferrei/srclient v0.5.4/go.mod h1:vbkLmWcgYa7JgfPvuy/+K8fTS0p1bApqadxrxi/S1MI= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= @@ -1220,8 +1238,8 @@ github.com/segmentio/ksuid v1.0.4 h1:sBo2BdShXjmcugAMwjugoGUdUV0pcxY5mW4xKRn3v4c github.com/segmentio/ksuid v1.0.4/go.mod h1:/XUiZBD3kVx5SmUOl55voK5yeAbBNNIed+2O73XgrPE= github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8= github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= -github.com/sethvargo/go-retry v0.2.4 h1:T+jHEQy/zKJf5s95UkguisicE0zuF9y7+/vgz08Ocec= -github.com/sethvargo/go-retry v0.2.4/go.mod h1:1afjQuvh7s4gflMObvjLPaWgluLLyhA1wmVZ6KLpICw= +github.com/sethvargo/go-retry v0.3.0 h1:EEt31A35QhrcRZtrYFDTBg91cqZVnFL2navjDrah2SE= +github.com/sethvargo/go-retry v0.3.0/go.mod h1:mNX17F0C/HguQMyMyJxcnU471gOZGxCLyYaFyAZraas= github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/gopsutil/v3 v3.24.3 h1:eoUGJSmdfLzJ3mxIhmOAhgKEKgQkeOwKpz1NbhVnuPE= @@ -1250,44 +1268,54 @@ github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/slack-go/slack v0.15.0 h1:LE2lj2y9vqqiOf+qIIy0GvEoxgF1N5yLGZffmEZykt0= github.com/slack-go/slack v0.15.0/go.mod h1:hlGi5oXA+Gt+yWTPP0plCdRKmjsDxecdHxYQdlMQKOw= -github.com/smartcontractkit/chain-selectors v1.0.82 h1:YCBn0HquAhH2jNVai32zQDFyC3XkrMHrBqWhH8W1hzo= -github.com/smartcontractkit/chain-selectors v1.0.82/go.mod h1:xsKM0aN3YGcQKTPRPDDtPx2l4mlTN1Djmg0VVXV40b8= +github.com/smartcontractkit/chain-selectors v1.0.85 h1:A7eyN7KIACxmngn1MJJ0giVtfELK9vh/eYyNU/Q/sFo= +github.com/smartcontractkit/chain-selectors v1.0.85/go.mod h1:xsKM0aN3YGcQKTPRPDDtPx2l4mlTN1Djmg0VVXV40b8= github.com/smartcontractkit/chainlink-aptos v0.0.0-20251027153600-2b072ff3618e h1:HIgcJV/CyhBntE5gK/8WitVzqD0k8PkuYj+lhfa6B6U= github.com/smartcontractkit/chainlink-aptos v0.0.0-20251027153600-2b072ff3618e/go.mod h1:iteU0WORHkArACVh/HoY/1bipV4TcNcJdTmom9uIT0E= github.com/smartcontractkit/chainlink-automation v0.8.1 h1:sTc9LKpBvcKPc1JDYAmgBc2xpDKBco/Q4h4ydl6+UUU= github.com/smartcontractkit/chainlink-automation v0.8.1/go.mod h1:Iij36PvWZ6blrdC5A/nrQUBuf3MH3JvsBB9sSyc9W08= -github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20251105200616-e158f436aa95 h1:PGtlfYOFXCyq3DegkBMeZED09HIVZDYhSTnc0t8oVAM= -github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20251105200616-e158f436aa95/go.mod h1:pETrvAF8uvkZgtDgI/oRllZZaC4IpPO26tMxh1u9LC4= +github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20251128020529-88d93b01d749 h1:2Cn3OA7vJxXyR/U9JHFGwa8H8YKTPFxNlMrFNb8f46g= +github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20251128020529-88d93b01d749/go.mod h1:pETrvAF8uvkZgtDgI/oRllZZaC4IpPO26tMxh1u9LC4= +github.com/smartcontractkit/chainlink-ccip/ccv/chains/evm v0.0.0-20251127040717-30244f57ea7a h1:E9mXoM0k5Lk3qgaEoqkSROriQD1rKOAxzytY/goUn8E= +github.com/smartcontractkit/chainlink-ccip/ccv/chains/evm v0.0.0-20251127040717-30244f57ea7a/go.mod h1:Gl35ExaFLinqVhp50+Yq1GnMuHb3fnDtZUFPCtcfV3M= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250912190424-fd2e35d7deb5 h1:f8ak6g6P2KT4HjUbleU+Bh0gUJXMoGuoriMSyGxxD4M= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250912190424-fd2e35d7deb5/go.mod h1:Ve1xD71bl193YIZQEoJMmBqLGQJdNs29bwbuObwvbhQ= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250912190424-fd2e35d7deb5 h1:Z4t2ZY+ZyGWxtcXvPr11y4o3CGqhg3frJB5jXkCSvWA= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250912190424-fd2e35d7deb5/go.mod h1:xtZNi6pOKdC3sLvokDvXOhgHzT+cyBqH/gWwvxTxqrg= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251124171825-b2109f37ee77 h1:QaW8iV9XFfQpygqWQiL4GurZv7bS0pNNBUtXFPT5gjs= -github.com/smartcontractkit/chainlink-common v0.9.6-0.20251124171825-b2109f37ee77/go.mod h1:uRnGLHKo56QYaPk93z0NRAIgv115lh72rzG40CiE1Mk= +github.com/smartcontractkit/chainlink-ccv v0.0.0-20251215155942-4daf59a09b5a h1:GIy+bmMlABnWEvAIe7Jiae2UHk/FIN7hRYavZdm6+f8= +github.com/smartcontractkit/chainlink-ccv v0.0.0-20251215155942-4daf59a09b5a/go.mod h1:2BhunX29Hx2aL31X7rSg5HT8nmmy5fvNsQaZ7wP3c/o= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251219154553-3688afcb0761 h1:K5uuKFGylvfxWEvaNcXHdXXNAjwhwz9+6FwTTX7ppGs= +github.com/smartcontractkit/chainlink-common v0.9.6-0.20251219154553-3688afcb0761/go.mod h1:ra9yvW8HbLgtXY0fHgnVdA5SjZ06v2/TNyTfPEJzsqo= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10 h1:FJAFgXS9oqASnkS03RE1HQwYQQxrO4l46O5JSzxqLgg= github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10/go.mod h1:oiDa54M0FwxevWwyAX773lwdWvFYYlYHHQV1LQ5HpWY= github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw= github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7/go.mod h1:yaDOAZF6MNB+NGYpxGCUc+owIdKrjvFW0JODdTcQ3V0= -github.com/smartcontractkit/chainlink-data-streams v0.1.6 h1:B3cwmJrVYoJVAjPOyQWTNaGD+V30HI1vFHhC2dQpWDo= -github.com/smartcontractkit/chainlink-data-streams v0.1.6/go.mod h1:e9jETTzrVO8iu9Zp5gDuTCmBVhSJwUOk6K4Q/VFrJ6o= -github.com/smartcontractkit/chainlink-deployments-framework v0.64.0 h1:QZCVEBENiyF/FvlaMuT/XlD4SCGib+ecRhmT3HojMCU= -github.com/smartcontractkit/chainlink-deployments-framework v0.64.0/go.mod h1:wo/aaK/nHhvvwG0IHgEpQUgYCaCqOrNy4KCAkrHc3jQ= -github.com/smartcontractkit/chainlink-evm v0.3.4-0.20251029010119-b2ed6162042f h1:XXeZ5ChjN13kDgl8eZVSyrN7ZUlLan2p3dzmtgkMG00= -github.com/smartcontractkit/chainlink-evm v0.3.4-0.20251029010119-b2ed6162042f/go.mod h1:6Zh4cDsZ5fa3k2t3ShnzEKAE+fp/KwtaWCZOrGoMWjg= -github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20251022075638-49d961001d1b h1:Dqhm/67Sb1ohgce8FW6tnK1CRXo2zoLCbV+EGyew5sg= -github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20251022075638-49d961001d1b/go.mod h1:oyfOm4k0uqmgZIfxk1elI/59B02shbbJQiiUdPdbMgI= +github.com/smartcontractkit/chainlink-data-streams v0.1.9 h1:yx0o8tMvgk9II5E6okeHmkJWI1hAv3u0ZadFnYPL8D0= +github.com/smartcontractkit/chainlink-data-streams v0.1.9/go.mod h1:8rUcGhjeXBoTFx2MynWgXiBWzVSB+LXd9JR6m8y2FfQ= +github.com/smartcontractkit/chainlink-deployments-framework v0.70.0 h1:wo2KL2viGZK/LhHLM8F88sRyhZF9wwWh+YDzW8hS00g= +github.com/smartcontractkit/chainlink-deployments-framework v0.70.0/go.mod h1:Cp7PuO7HUDugp7bWGP/TcDAvvvkFLdKOVrSm0zXlnhg= +github.com/smartcontractkit/chainlink-evm v0.3.4-0.20251210110629-10c56e8d2cec h1:K8sLjgwPgozQb86LH+aWXqBUJak6VGwSt5YiKbCI/uY= +github.com/smartcontractkit/chainlink-evm v0.3.4-0.20251210110629-10c56e8d2cec/go.mod h1:9VcrUs+H/f9ekkqAdfUd70Pk2dA1Zc3KykJVFBfJNHs= +github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20251211123524-f0c4fe7cfc0a h1:kVKWRGrSCioMY2lEVIEblerv/KkINIQS2hLUOw2wKOg= +github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20251211123524-f0c4fe7cfc0a/go.mod h1:oyfOm4k0uqmgZIfxk1elI/59B02shbbJQiiUdPdbMgI= github.com/smartcontractkit/chainlink-feeds v0.1.2-0.20250227211209-7cd000095135 h1:8u9xUrC+yHrTDexOKDd+jrA6LCzFFHeX1G82oj2fsSI= github.com/smartcontractkit/chainlink-feeds v0.1.2-0.20250227211209-7cd000095135/go.mod h1:NkvE4iQgiT7dMCP6U3xPELHhWhN5Xr6rHC0axRebyMU= github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-20250818175541-3389ac08a563 h1:ACpDbAxG4fa4sA83dbtYcrnlpE/y7thNIZfHxTv2ZLs= github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-20250818175541-3389ac08a563/go.mod h1:jP5mrOLFEYZZkl7EiCHRRIMSSHCQsYypm1OZSus//iI= -github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20251021173435-e86785845942 h1:D7N2d46Nj7ZSzpdDRg6GtsgldNgZyOojjWrH/Y/Fl+w= -github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20251021173435-e86785845942/go.mod h1:+pRGfDej1r7cHMs1dYmuyPuOZzYB9Q+PKu0FvZOYlmw= -github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20251020150604-8ab84f7bad1a h1:pr0VFI7AWlDVJBEkcvzXWd97V8w8QMNjRdfPVa/IQLk= -github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20251020150604-8ab84f7bad1a/go.mod h1:jo+cUqNcHwN8IF7SInQNXDZ8qzBsyMpnLdYbDswviFc= +github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20251210101658-1c5c8e4c4f15 h1:Mf+IRvrXutcKAKpuOxq5Ae+AAw4Z5vc66q1xI7qimZQ= +github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20251210101658-1c5c8e4c4f15/go.mod h1:kGprqyjsz6qFNVszOQoHc24wfvCjyipNZFste/3zcbs= +github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20251206233640-139a324649d9 h1:TAVreQK5eP63a0zu5Qe34i4pYGGo5x8zgfJ1NVVo6K4= +github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20251206233640-139a324649d9/go.mod h1:HG/aei0MgBOpsyRLexdKGtOUO8yjSJO3iUu0Uu8KBm4= github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20251021173435-e86785845942 h1:T/eCDsUI8EJT4n5zSP4w1mz4RHH+ap8qieA17QYfBhk= github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20251021173435-e86785845942/go.mod h1:2JTBNp3FlRdO/nHc4dsc9bfxxMClMO1Qt8sLJgtreBY= github.com/smartcontractkit/chainlink-protos/billing/go v0.0.0-20251024234028-0988426d98f4 h1:GCzrxDWn3b7jFfEA+WiYRi8CKoegsayiDoJBCjYkneE= github.com/smartcontractkit/chainlink-protos/billing/go v0.0.0-20251024234028-0988426d98f4/go.mod h1:HHGeDUpAsPa0pmOx7wrByCitjQ0mbUxf0R9v+g67uCA= +github.com/smartcontractkit/chainlink-protos/chainlink-ccv/committee-verifier v0.0.0-20251211142334-5c3421fe2c8d h1:VYoBBNnQpZ5p+enPTl8SkKBRaubqyGpO0ul3B1np++I= +github.com/smartcontractkit/chainlink-protos/chainlink-ccv/committee-verifier v0.0.0-20251211142334-5c3421fe2c8d/go.mod h1:oNFoKHRIerxuaANa8ASNejtHrdsG26LqGtQ2XhSac2g= +github.com/smartcontractkit/chainlink-protos/chainlink-ccv/message-discovery v0.0.0-20251211142334-5c3421fe2c8d h1:pKCyW7BYzO5GThFNlXZY0Azx/yOnI4b5GeuLeU23ie0= +github.com/smartcontractkit/chainlink-protos/chainlink-ccv/message-discovery v0.0.0-20251211142334-5c3421fe2c8d/go.mod h1:ATjAPIVJibHRcIfiG47rEQkUIOoYa6KDvWj3zwCAw6g= +github.com/smartcontractkit/chainlink-protos/chainlink-ccv/verifier v0.0.0-20251211142334-5c3421fe2c8d h1:AJy55QJ/pBhXkZjc7N+ATnWfxrcjq9BI9DmdtdjwDUQ= +github.com/smartcontractkit/chainlink-protos/chainlink-ccv/verifier v0.0.0-20251211142334-5c3421fe2c8d/go.mod h1:5JdppgngCOUS76p61zCinSCgOhPeYQ+OcDUuome5THQ= github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20251124151448-0448aefdaab9 h1:QRWXJusIj/IRY5Pl3JclNvDre0cZPd/5NbILwc4RV2M= github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20251124151448-0448aefdaab9/go.mod h1:jUC52kZzEnWF9tddHh85zolKybmLpbQ1oNA4FjOHt1Q= github.com/smartcontractkit/chainlink-protos/job-distributor v0.17.0 h1:xHPmFDhff7QpeFxKsZfk+24j4AlnQiFjjRh5O87Peu4= @@ -1306,46 +1334,46 @@ github.com/smartcontractkit/chainlink-protos/svr v1.1.0 h1:79Z9N9dMbMVRGaLoDPAQ+ github.com/smartcontractkit/chainlink-protos/svr v1.1.0/go.mod h1:TcOliTQU6r59DwG4lo3U+mFM9WWyBHGuFkkxQpvSujo= github.com/smartcontractkit/chainlink-protos/workflows/go v0.0.0-20251025021331-aa7746850cc4 h1:ZISmdiYAU0qXt2kC8/qxdIs4zg2PLRriatNDw6fANpo= github.com/smartcontractkit/chainlink-protos/workflows/go v0.0.0-20251025021331-aa7746850cc4/go.mod h1:HIpGvF6nKCdtZ30xhdkKWGM9+4Z4CVqJH8ZBL1FTEiY= -github.com/smartcontractkit/chainlink-sui v0.0.0-20251105220250-f8d7f06e3b8d h1:Bpp6fmkuzVNIQOE5qtzn8J1jzpdW+7hxGBu52qTPVZs= -github.com/smartcontractkit/chainlink-sui v0.0.0-20251105220250-f8d7f06e3b8d/go.mod h1:VlyZhVw+a93Sk8rVHOIH6tpiXrMzuWLZrjs1eTIExW8= -github.com/smartcontractkit/chainlink-testing-framework/framework v0.11.7 h1:jVlRG9GTpDGYtP0iabxHZW4s3pXdpN4/lTgZEdE64P4= -github.com/smartcontractkit/chainlink-testing-framework/framework v0.11.7/go.mod h1:BTUmWJGbOQtMdDW8cy4fu0wLoj8tKFQiLR7SE+OyTXU= +github.com/smartcontractkit/chainlink-sui v0.0.0-20251205161630-88314452254c h1:aNA7J31EuOf755BDgNuhxte5+Z6wucBx/ONGihw2OqA= +github.com/smartcontractkit/chainlink-sui v0.0.0-20251205161630-88314452254c/go.mod h1:zrtmeh3wHL+qXu/vaaR7lZ5TSh00I4JYbpOqqb9bXp0= +github.com/smartcontractkit/chainlink-testing-framework/framework v0.12.1 h1:Ld3OrOQfLubJ+os0/oau2V6RISgsEdBg+Q002zkgXpQ= +github.com/smartcontractkit/chainlink-testing-framework/framework v0.12.1/go.mod h1:r6KXRM1u9ch5KFR2jspkgtyWEC1X+gxPCL8mR63U990= github.com/smartcontractkit/chainlink-testing-framework/lib v1.54.7 h1:6dmdg2tppPKEFuEwBcT1kSEHj5Uj1xrWnKqX0wZg7zo= github.com/smartcontractkit/chainlink-testing-framework/lib v1.54.7/go.mod h1:dgwtcefGr+0i+C2S6V/Xgntzm7E5CPxXMyi2OnQvnHI= github.com/smartcontractkit/chainlink-testing-framework/parrot v0.6.2 h1:cWUHB6QETyKbmh0B988f5AKIKb3aBDWugfrZ04jAUUY= github.com/smartcontractkit/chainlink-testing-framework/parrot v0.6.2/go.mod h1:Z4K5VJLjsfqIIaBcZ1Sfccxu0xsCxBjPa6zF+5gtQaM= github.com/smartcontractkit/chainlink-testing-framework/seth v1.51.2 h1:ZJ/8Jx6Be5//TyjPi1pS1uotnmcYq5vVkSyISIymSj8= github.com/smartcontractkit/chainlink-testing-framework/seth v1.51.2/go.mod h1:kHYJnZUqiPF7/xN5273prV+srrLJkS77GbBXHLKQpx0= -github.com/smartcontractkit/chainlink-ton v0.0.0-20251113211653-082bd18d77bb h1:qwWAfnePapmspQQnSI3Jed9b32a9uNc5ohV/D2gCg1Q= -github.com/smartcontractkit/chainlink-ton v0.0.0-20251113211653-082bd18d77bb/go.mod h1:rxekiaWnJnFFfklae1OvO6T7xHJtsEldDvW/e5+b/qg= +github.com/smartcontractkit/chainlink-ton v0.0.0-20251219221624-54a39a031e62 h1:/gnBkA9Ph6+EaWoBuR7FE8UIKfegY7eP3+QhxvVTYxw= +github.com/smartcontractkit/chainlink-ton v0.0.0-20251219221624-54a39a031e62/go.mod h1:z27AgU6fEXkkfmUAzcbEH9u3RKz2oaGy3isb7KK6Z2E= github.com/smartcontractkit/chainlink-tron/relayer v0.0.11-0.20251014143056-a0c6328c91e9 h1:7Ut0g+Pdm+gcu2J/Xv8OpQOVf7uLGErMX8yhC4b4tIA= github.com/smartcontractkit/chainlink-tron/relayer v0.0.11-0.20251014143056-a0c6328c91e9/go.mod h1:h9hMs6K4hT1+mjYnJD3/SW1o7yC/sKjNi0Qh8hLfiCE= github.com/smartcontractkit/chainlink-tron/relayer/gotron-sdk v0.0.5-0.20251014124537-af6b1684fe15 h1:idp/RjsFznR48JWGfZICsrpcl9JTrnMzoUNVz8MhQMI= github.com/smartcontractkit/chainlink-tron/relayer/gotron-sdk v0.0.5-0.20251014124537-af6b1684fe15/go.mod h1:ea1LESxlSSOgc2zZBqf1RTkXTMthHaspdqUHd7W4lF0= -github.com/smartcontractkit/chainlink/deployment v0.0.0-20251114183516-c3b1a4a2be75 h1:bGe77meYVJ6fGDiCsA7jiXlv0JPMGoQbN8lDbvHn3b4= -github.com/smartcontractkit/chainlink/deployment v0.0.0-20251114183516-c3b1a4a2be75/go.mod h1:B/EIi+gAUvnZMjFbkpWDUrvAoW1co/XAHstR1TSUwao= -github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20251114183516-c3b1a4a2be75 h1:WQ02gWbKbEGAm8wIHx1J90gql+jaFuEj1pPxwVMw6dA= -github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20251114183516-c3b1a4a2be75/go.mod h1:pV0G5sT/qNVW5ZlLTFcEniXwY31rnv3BH4RPrzgR418= -github.com/smartcontractkit/chainlink/v2 v2.29.1-cre-beta.0.0.20251114183516-c3b1a4a2be75 h1:E/7iAl3sZs+w+N8BJSuWVuRKJPWGvnNzYNEiD5PZICs= -github.com/smartcontractkit/chainlink/v2 v2.29.1-cre-beta.0.0.20251114183516-c3b1a4a2be75/go.mod h1:qm0GVo6moxAA404yF7eUW5LIOvqs2p/fMke3eLRF7ME= +github.com/smartcontractkit/chainlink/deployment v0.0.0-20251229212039-6b9a19bf2c9f h1:sLZ/9oI4eh5Ccn4It0w2JS5SJi1U9nSt4xc7M2Mzbxk= +github.com/smartcontractkit/chainlink/deployment v0.0.0-20251229212039-6b9a19bf2c9f/go.mod h1:uvs9QxJRb8FJovxvOAk3BM9C2RPtchxkH7nwUvTYUQg= +github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20251229212039-6b9a19bf2c9f h1:bLZS9bcoMEgutt8sXh0yaHm60quK6ZZ8vg3AW01Xz1w= +github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20251229212039-6b9a19bf2c9f/go.mod h1:qFXcH0HYVg5UFVMXDcTl41HxLmZOKJxd7WNoVlxx+tA= +github.com/smartcontractkit/chainlink/v2 v2.29.1-cre-beta.0.0.20251229212039-6b9a19bf2c9f h1:cUR/QyImDHnqKWORZBNg+9B7VF57tyWHddOi/cLKxtQ= +github.com/smartcontractkit/chainlink/v2 v2.29.1-cre-beta.0.0.20251229212039-6b9a19bf2c9f/go.mod h1:UaJsY5gYW1diT5X6ovpZqMnpWtPVqBPz4Ld6GH9Qdvw= github.com/smartcontractkit/cre-sdk-go v0.7.1-0.20250919133015-2df149f34a81 h1:CfnjzJvn3iX93PzdGucyGJmgv/KDXv8DfKcLw/mix24= github.com/smartcontractkit/cre-sdk-go v0.7.1-0.20250919133015-2df149f34a81/go.mod h1:CQY8hCISjctPmt8ViDVgFm4vMGLs5fYI198QhkBS++Y= github.com/smartcontractkit/freeport v0.1.3-0.20250716200817-cb5dfd0e369e h1:Hv9Mww35LrufCdM9wtS9yVi/rEWGI1UnjHbcKKU0nVY= github.com/smartcontractkit/freeport v0.1.3-0.20250716200817-cb5dfd0e369e/go.mod h1:T4zH9R8R8lVWKfU7tUvYz2o2jMv1OpGCdpY2j2QZXzU= github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 h1:12ijqMM9tvYVEm+nR826WsrNi6zCKpwBhuApq127wHs= github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7/go.mod h1:FX7/bVdoep147QQhsOPkYsPEXhGZjeYx6lBSaSXtZOA= -github.com/smartcontractkit/libocr v0.0.0-20251031190958-7324c200a6b0 h1:PEn6Erx59QTDKj78d1qGdUZv730H2mMlKQXKulSVRQE= -github.com/smartcontractkit/libocr v0.0.0-20251031190958-7324c200a6b0/go.mod h1:oJkBKVn8zoBQm7Feah9CiuEHyCqAhnp1LJBzrvloQtM= -github.com/smartcontractkit/mcms v0.30.2-0.20251105142805-988f5319936f h1:AmW1dZqduXY3xLd4VLzvNtJ06vnbi22vE7AGdsZ2Wo8= -github.com/smartcontractkit/mcms v0.30.2-0.20251105142805-988f5319936f/go.mod h1:x3mNRGl1K+iFc/v/g7jw42IUQZl6zyE8OliTY+h+cPg= +github.com/smartcontractkit/libocr v0.0.0-20251212213002-0a5e2f907dda h1:OjM+79FRuVZlj0Qd4y+q8Xmz/tEn5y8npqmiQiMMj+w= +github.com/smartcontractkit/libocr v0.0.0-20251212213002-0a5e2f907dda/go.mod h1:oJkBKVn8zoBQm7Feah9CiuEHyCqAhnp1LJBzrvloQtM= +github.com/smartcontractkit/mcms v0.30.2 h1:xdvZZ5V4q6J/zzb2QV5wjWaZtGj+xvyHy8UVhsOMA8I= +github.com/smartcontractkit/mcms v0.30.2/go.mod h1:7GXnTUilJcUdzndp7HXDwjinjubG2Jsu2A1oRbtaKBs= github.com/smartcontractkit/quarantine v0.0.0-20250909213106-ece491bef618 h1:rN8PnOZj53L70zlm1aYz1k14lXNCt7NoV666TDfcTJA= github.com/smartcontractkit/quarantine v0.0.0-20250909213106-ece491bef618/go.mod h1:iwy4yWFuK+1JeoIRTaSOA9pl+8Kf//26zezxEXrAQEQ= github.com/smartcontractkit/smdkg v0.0.0-20251029093710-c38905e58aeb h1:kLHdQQkijaPGsBbtV2rJgpzVpQ96e7T10pzjNlWfK8U= github.com/smartcontractkit/smdkg v0.0.0-20251029093710-c38905e58aeb/go.mod h1:4s5hj/nlMF9WV+T5Uhy4n9IYpRpzfJzT+vTKkNT7T+Y= github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20241009055228-33d0c0bf38de h1:n0w0rKF+SVM+S3WNlup6uabXj2zFlFNfrlsKCMMb/co= github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20241009055228-33d0c0bf38de/go.mod h1:Sl2MF/Fp3fgJIVzhdGhmZZX2BlnM0oUUyBP4s4xYb6o= -github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20250624150019-e49f7e125e6b h1:hN0Aqc20PTMGkYzqJGKIZCZMR4RoFlI85WpbK9fKIns= -github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20250624150019-e49f7e125e6b/go.mod h1:NSc7hgOQbXG3DAwkOdWnZzLTZENXSwDJ7Va1nBp0YU0= +github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20251120172354-e8ec0386b06c h1:S1AFIjfHT95ev6gqHKBGy1zj3Tz0fIN3XzkaDUn77wY= +github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20251120172354-e8ec0386b06c/go.mod h1:NSc7hgOQbXG3DAwkOdWnZzLTZENXSwDJ7Va1nBp0YU0= github.com/smartcontractkit/wsrpc v0.8.5-0.20250502134807-c57d3d995945 h1:zxcODLrFytOKmAd8ty8S/XK6WcIEJEgRBaL7sY/7l4Y= github.com/smartcontractkit/wsrpc v0.8.5-0.20250502134807-c57d3d995945/go.mod h1:m3pdp17i4bD50XgktkzWetcV5yaLsi7Gunbv4ZgN6qg= github.com/smarty/assertions v1.15.0/go.mod h1:yABtdzeQs6l1brC900WlRNwj6ZR55d7B+E8C6HtKdec= @@ -1401,8 +1429,8 @@ github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= -github.com/supranational/blst v0.3.14 h1:xNMoHRJOTwMn63ip6qoWJ2Ymgvj7E2b9jY2FAwY+qRo= -github.com/supranational/blst v0.3.14/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= +github.com/supranational/blst v0.3.16-0.20250831170142-f48500c1fdbe h1:nbdqkIGOGfUAD54q1s2YBcBz/WcsxCO9HUQ4aGV5hUw= +github.com/supranational/blst v0.3.16-0.20250831170142-f48500c1fdbe/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= @@ -1412,8 +1440,8 @@ github.com/test-go/testify v1.1.4 h1:Tf9lntrKUMHiXQ07qBScBTSA0dhYQlu83hswqelv1iE github.com/test-go/testify v1.1.4/go.mod h1:rH7cfJo/47vWGdi4GPj16x3/t1xGOj2YxzmNQzk2ghU= github.com/testcontainers/testcontainers-go v0.39.0 h1:uCUJ5tA+fcxbFAB0uP3pIK3EJ2IjjDUHFSZ1H1UxAts= github.com/testcontainers/testcontainers-go v0.39.0/go.mod h1:qmHpkG7H5uPf/EvOORKvS6EuDkBUPE3zpVGaH9NL7f8= -github.com/testcontainers/testcontainers-go/modules/postgres v0.38.0 h1:KFdx9A0yF94K70T6ibSuvgkQQeX1xKlZVF3hEagXEtY= -github.com/testcontainers/testcontainers-go/modules/postgres v0.38.0/go.mod h1:T/QRECND6N6tAKMxF1Za+G2tpwnGEHcODzHRsgIpw9M= +github.com/testcontainers/testcontainers-go/modules/postgres v0.39.0 h1:REJz+XwNpGC/dCgTfYvM4SKqobNqDBfvhq74s2oHTUM= +github.com/testcontainers/testcontainers-go/modules/postgres v0.39.0/go.mod h1:4K2OhtHEeT+JSIFX4V8DkGKsyLa96Y2vLdd3xsxD5HE= github.com/theodesp/go-heaps v0.0.0-20190520121037-88e35354fe0a h1:YuO+afVc3eqrjiCUizNCxI53bl/BnPiVwXqLzqYTqgU= github.com/theodesp/go-heaps v0.0.0-20190520121037-88e35354fe0a/go.mod h1:/sfW47zCZp9FrtGcWyo1VjbgDaodxX9ovZvgLb/MxaA= github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= @@ -1448,8 +1476,8 @@ github.com/unrolled/secure v1.13.0 h1:sdr3Phw2+f8Px8HE5sd1EHdj1aV3yUwed/uZXChLFs github.com/unrolled/secure v1.13.0/go.mod h1:BmF5hyM6tXczk3MpQkFf1hpKSRqCyhqcbiQtiAF7+40= github.com/urfave/cli v1.22.16 h1:MH0k6uJxdwdeWQTwhSO42Pwr4YLrNLwBtg1MRgTqPdQ= github.com/urfave/cli v1.22.16/go.mod h1:EeJR6BKodywf4zciqrdw6hpCPk68JO9z5LazXZMn5Po= -github.com/urfave/cli/v2 v2.27.6 h1:VdRdS98FNhKZ8/Az8B7MTyGQmpIr36O1EHybx/LaZ4g= -github.com/urfave/cli/v2 v2.27.6/go.mod h1:3Sevf16NykTbInEnD0yKkjDAeZDS0A6bzhBH5hrMvTQ= +github.com/urfave/cli/v2 v2.27.7 h1:bH59vdhbjLv3LAvIu6gd0usJHgoTTPhCFib8qqOwXYU= +github.com/urfave/cli/v2 v2.27.7/go.mod h1:CyNAG/xg+iAOg0N4MPGZqVmv2rCoP267496AOXUZjA4= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fastjson v1.6.4 h1:uAUNq9Z6ymTgGhcm0UynUAB6tlbakBrz6CQFax3BXVQ= @@ -1618,6 +1646,7 @@ golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDf golang.org/x/crypto v0.20.0/go.mod h1:Xwo95rrVNIoSMx9wa1JroENMToLWn3RNVrTBpLHgZPQ= golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q= golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4= +golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1658,8 +1687,8 @@ golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.29.0 h1:HV8lRxZC4l2cr3Zq1LvtOsi/ThTgWnUk/y64QSs8GwA= -golang.org/x/mod v0.29.0/go.mod h1:NyhrlYXJ2H4eJiRy/WDBO6HMqZQ6q9nk4JzS3NuCK+w= +golang.org/x/mod v0.31.0 h1:HaW9xtz0+kOcWKwli0ZXy79Ix+UW/vOfmWI5QVd2tgI= +golang.org/x/mod v0.31.0/go.mod h1:43JraMp9cGx1Rx3AqioxrbrhNsLl2l/iNAvuBkrezpg= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1731,8 +1760,8 @@ golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI= -golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU= +golang.org/x/oauth2 v0.32.0 h1:jsCblLleRMDrxMN29H3z/k1KliIvpLgCkE6R8FXXNgY= +golang.org/x/oauth2 v0.32.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1746,8 +1775,8 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I= -golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= +golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1832,14 +1861,13 @@ golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc= -golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= -golang.org/x/telemetry v0.0.0-20251008203120-078029d740a8 h1:LvzTn0GQhWuvKH/kVRS3R3bVAsdQWI7hvfLHGgh9+lU= -golang.org/x/telemetry v0.0.0-20251008203120-078029d740a8/go.mod h1:Pi4ztBfryZoJEkyFTI5/Ocsu2jXyDr6iSdgJiYE/uwE= +golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk= +golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/telemetry v0.0.0-20251208220230-2638a1023523 h1:H52Mhyrc44wBgLTGzq6+0cmuVuF3LURCSXsLMOqfFos= +golang.org/x/telemetry v0.0.0-20251208220230-2638a1023523/go.mod h1:ArQvPJS723nJQietgilmZA+shuB3CZxH1n2iXq9VSfs= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -1876,6 +1904,7 @@ golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.12.0 h1:ScB/8o8olJvc+CQPWrK3fPZNfh7qgwCrY0zJmoEQLSE= golang.org/x/time v0.12.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg= +golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -1938,8 +1967,8 @@ golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= -golang.org/x/tools v0.38.0 h1:Hx2Xv8hISq8Lm16jvBZ2VQf+RLmbd7wVUsALibYI/IQ= -golang.org/x/tools v0.38.0/go.mod h1:yEsQ/d/YK8cjh0L6rZlY8tgtlKiBNTL14pGDJPJpYQs= +golang.org/x/tools v0.39.0 h1:ik4ho21kwuQln40uelmciQPp9SipgNDdrafrYA4TmQQ= +golang.org/x/tools v0.39.0/go.mod h1:JnefbkDPyD8UU2kI5fuf8ZX4/yUeh9W877ZeBONxUqQ= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1951,8 +1980,10 @@ golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da h1:noIWHXmPHxILtqtCOPIhS golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= +gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= +gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -2028,10 +2059,10 @@ google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaE google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20250505200425-f936aa4a68b2 h1:1tXaIXCracvtsRxSBsYDiSBN0cuJvM7QYW+MrpIRY78= google.golang.org/genproto v0.0.0-20250505200425-f936aa4a68b2/go.mod h1:49MsLSx0oWMOZqcpB3uL8ZOkAh1+TndpJ8ONoCBWiZk= -google.golang.org/genproto/googleapis/api v0.0.0-20251007200510-49b9836ed3ff h1:8Zg5TdmcbU8A7CXGjGXF1Slqu/nIFCRaR3S5gT2plIA= -google.golang.org/genproto/googleapis/api v0.0.0-20251007200510-49b9836ed3ff/go.mod h1:dbWfpVPvW/RqafStmRWBUpMN14puDezDMHxNYiRfQu0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20251002232023-7c0ddcbb5797 h1:CirRxTOwnRWVLKzDNrs0CXAaVozJoR4G9xvdRecrdpk= -google.golang.org/genproto/googleapis/rpc v0.0.0-20251002232023-7c0ddcbb5797/go.mod h1:HSkG/KdJWusxU1F6CNrwNDjBMgisKxGnc5dAZfT0mjQ= +google.golang.org/genproto/googleapis/api v0.0.0-20251022142026-3a174f9686a8 h1:mepRgnBZa07I4TRuomDE4sTIYieg/osKmzIf4USdWS4= +google.golang.org/genproto/googleapis/api v0.0.0-20251022142026-3a174f9686a8/go.mod h1:fDMmzKV90WSg1NbozdqrE64fkuTv6mlq2zxo9ad+3yo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251022142026-3a174f9686a8 h1:M1rk8KBnUsBDg1oPGHNCxG4vc1f49epmTO7xscSajMk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20251022142026-3a174f9686a8/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -2052,8 +2083,8 @@ google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAG google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.76.0 h1:UnVkv1+uMLYXoIz6o7chp59WfQUYA2ex/BXQ9rHZu7A= -google.golang.org/grpc v1.76.0/go.mod h1:Ju12QI8M6iQJtbcsV+awF5a4hfJMLi4X0JLo94ULZ6c= +google.golang.org/grpc v1.77.0 h1:wVVY6/8cGA6vvffn+wWK5ToddbgdU3d8MNENr4evgXM= +google.golang.org/grpc v1.77.0/go.mod h1:z0BY1iVj0q8E1uSQCjL9cppRj+gnZjzDnzV0dHhrNig= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -2132,6 +2163,14 @@ k8s.io/kubectl v0.31.2 h1:gTxbvRkMBwvTSAlobiTVqsH6S8Aa1aGyBcu5xYLsn8M= k8s.io/kubectl v0.31.2/go.mod h1:EyASYVU6PY+032RrTh5ahtSOMgoDRIux9V1JLKtG5xM= k8s.io/utils v0.0.0-20241210054802-24370beab758 h1:sdbE21q2nlQtFh65saZY+rRM6x6aJJI8IUa1AmH/qa0= k8s.io/utils v0.0.0-20241210054802-24370beab758/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +modernc.org/libc v1.66.10 h1:yZkb3YeLx4oynyR+iUsXsybsX4Ubx7MQlSYEw4yj59A= +modernc.org/libc v1.66.10/go.mod h1:8vGSEwvoUoltr4dlywvHqjtAqHBaw0j1jI7iFBTAr2I= +modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU= +modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg= +modernc.org/memory v1.11.0 h1:o4QC8aMQzmcwCK3t3Ux/ZHmwFPzE6hf2Y5LbkRs+hbI= +modernc.org/memory v1.11.0/go.mod h1:/JP4VbVC+K5sU2wZi9bHoq2MAkCnrt2r98UGeSK7Mjw= +modernc.org/sqlite v1.39.0 h1:6bwu9Ooim0yVYA7IZn9demiQk/Ejp0BtTjBWFLymSeY= +modernc.org/sqlite v1.39.0/go.mod h1:cPTJYSlgg3Sfg046yBShXENNtPrWrDX8bsbAQBzgQ5E= nhooyr.io/websocket v1.8.10 h1:mv4p+MnGrLDcPlBoWsvPP7XCzTYMXP9F9eIGoKbgx7Q= nhooyr.io/websocket v1.8.10/go.mod h1:rN9OFWIUwuxg4fR5tELlYC04bXYowCP9GX47ivo2l+c= nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= diff --git a/integration-tests/relayinterface/buffer_payload_test.go b/integration-tests/relayinterface/buffer_payload_test.go index d485cf69a..294d05b48 100644 --- a/integration-tests/relayinterface/buffer_payload_test.go +++ b/integration-tests/relayinterface/buffer_payload_test.go @@ -18,6 +18,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" "github.com/smartcontractkit/chainlink-common/pkg/types" + soltypes "github.com/smartcontractkit/chainlink-common/pkg/types/solana" "github.com/smartcontractkit/chainlink-solana/contracts/generated/buffer_payload" "github.com/smartcontractkit/chainlink-solana/integration-tests/utils" @@ -77,25 +78,25 @@ func Test_BufferPayload(t *testing.T) { contractName := "buffer" methodName := "execute" - cwConfig := chainwriter.ChainWriterConfig{ - Programs: map[string]chainwriter.ProgramConfig{ + cwConfig := soltypes.ContractWriterConfig{ + Programs: map[string]soltypes.ProgramConfig{ contractName: { - Methods: map[string]chainwriter.MethodConfig{ + Methods: map[string]soltypes.MethodConfig{ methodName: { FromAddress: sender.PublicKey().String(), ChainSpecificName: "execute", ComputeUnitLimitOverhead: 150_000, BufferPayloadMethod: "CCIPExecutionReportBuffer", - Accounts: []chainwriter.Lookup{ + Accounts: []soltypes.Lookup{ { - AccountConstant: &chainwriter.AccountConstant{ + AccountConstant: &soltypes.AccountConstant{ Address: sender.PublicKey().String(), IsSigner: true, IsWritable: true, }, }, { - AccountConstant: &chainwriter.AccountConstant{ + AccountConstant: &soltypes.AccountConstant{ Address: solana.SystemProgramID.String(), IsSigner: false, IsWritable: false, @@ -177,7 +178,7 @@ func Test_BufferPayload(t *testing.T) { }) } -func initializeAndRunCW(t *testing.T, lggr logger.Logger, multiClient client.MultiClient, txm *txm.Txm, config chainwriter.ChainWriterConfig) *chainwriter.SolanaChainWriterService { +func initializeAndRunCW(t *testing.T, lggr logger.Logger, multiClient client.MultiClient, txm *txm.Txm, config soltypes.ContractWriterConfig) *chainwriter.SolanaChainWriterService { cw, err := chainwriter.NewSolanaChainWriterService(lggr, multiClient, txm, nil, config) require.NoError(t, err) servicetest.Run(t, cw) diff --git a/integration-tests/relayinterface/chain_components_test.go b/integration-tests/relayinterface/chain_components_test.go index 03cb4646e..f694dde51 100644 --- a/integration-tests/relayinterface/chain_components_test.go +++ b/integration-tests/relayinterface/chain_components_test.go @@ -23,7 +23,7 @@ import ( "github.com/gagliardetto/solana-go/rpc/ws" "github.com/google/uuid" "github.com/jmoiron/sqlx" - "github.com/smartcontractkit/chainlink-common/pkg/sqlutil/pg" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" @@ -34,11 +34,13 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" commontestutils "github.com/smartcontractkit/chainlink-common/pkg/loop/testutils" "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil/pg" "github.com/smartcontractkit/chainlink-common/pkg/sqlutil/sqltest" "github.com/smartcontractkit/chainlink-common/pkg/types" . "github.com/smartcontractkit/chainlink-common/pkg/types/interfacetests" //nolint common practice to import test mods with . "github.com/smartcontractkit/chainlink-common/pkg/types/query" "github.com/smartcontractkit/chainlink-common/pkg/types/query/primitives" + soltypes "github.com/smartcontractkit/chainlink-common/pkg/types/solana" "github.com/smartcontractkit/chainlink-protos/cre/go/values" contractprimary "github.com/smartcontractkit/chainlink-solana/contracts/generated/contract_reader_interface" @@ -1344,24 +1346,24 @@ func (it *SolanaChainComponentsInterfaceTester[T]) buildContractReaderConfig(t T uint64ReadDef := config.ReadDefinition{ ChainSpecificName: "DataAccount", ReadType: config.Account, - PDADefinition: codec.PDATypeDef{ + PDADefinition: soltypes.PDATypeDef{ Prefix: pdaDataPrefix, }, OutputModifications: commoncodec.ModifiersConfig{ &commoncodec.PropertyExtractorConfig{FieldName: "U64Value"}, }, } - basicContractDef := config.ChainContractReader{ + basicContractDef := soltypes.ChainContractReader{ IDL: mustUnmarshalIDL(t, string(it.Helper.GetPrimaryIDL(t))), - Reads: map[string]config.ReadDefinition{ + Reads: map[string]soltypes.ReadDefinition{ MethodReturningUint64: uint64ReadDef, }, } - readWithAddressHardCodedIntoResponseDef := config.ReadDefinition{ + readWithAddressHardCodedIntoResponseDef := soltypes.ReadDefinition{ ChainSpecificName: "MultiRead1", - ReadType: config.Account, - PDADefinition: codec.PDATypeDef{ + ReadType: soltypes.Account, + PDADefinition: soltypes.PDATypeDef{ Prefix: []byte("multi_read1"), }, ResponseAddressHardCoder: &commoncodec.HardCodeModifierConfig{ @@ -1380,38 +1382,38 @@ func (it *SolanaChainComponentsInterfaceTester[T]) buildContractReaderConfig(t T OffChainValues: map[string]any{"U": "", "V": false}, }, } - multiReadDef.MultiReader = &config.MultiReader{ - Reads: []config.ReadDefinition{{ + multiReadDef.MultiReader = &soltypes.MultiReader{ + Reads: []soltypes.ReadDefinition{{ ChainSpecificName: "MultiRead2", - PDADefinition: codec.PDATypeDef{Prefix: []byte("multi_read2")}, - ReadType: config.Account, + PDADefinition: soltypes.PDATypeDef{Prefix: []byte("multi_read2")}, + ReadType: soltypes.Account, }}, } idl := mustUnmarshalIDL(t, string(it.Helper.GetPrimaryIDL(t))) - idl.Accounts = append(idl.Accounts, codec.IdlTypeDef{ + idl.Accounts = append(idl.Accounts, soltypes.IdlTypeDef{ Name: "USDPerToken", - Type: codec.IdlTypeDefTy{ - Kind: codec.IdlTypeDefTyKindStruct, - Fields: &codec.IdlTypeDefStruct{ + Type: soltypes.IdlTypeDefTy{ + Kind: soltypes.IdlTypeDefTyKindStruct, + Fields: &soltypes.IdlTypeDefStruct{ { Name: "tokenPrices", - Type: codec.IdlType{ - AsIdlTypeVec: &codec.IdlTypeVec{Vec: codec.IdlType{AsIdlTypeDefined: &codec.IdlTypeDefined{Defined: "TimestampedPackedU224"}}}, + Type: soltypes.IdlType{ + AsIdlTypeVec: &soltypes.IdlTypeVec{Vec: soltypes.IdlType{AsIdlTypeDefined: &soltypes.IdlTypeDefined{Defined: "TimestampedPackedU224"}}}, }, }, }, }, }) - cfg := config.ContractReader{ - Namespaces: map[string]config.ChainContractReader{ + cfg := soltypes.ContractReader{ + Namespaces: map[string]soltypes.ChainContractReader{ AnyContractName: { IDL: idl, - Reads: map[string]config.ReadDefinition{ + Reads: map[string]soltypes.ReadDefinition{ ReadUninitializedPDA: { ChainSpecificName: "DataAccount", - ReadType: config.Account, + ReadType: soltypes.Account, PDADefinition: codec.PDATypeDef{ Prefix: []byte("AAAAAAAAAA"), }, @@ -1419,15 +1421,15 @@ func (it *SolanaChainComponentsInterfaceTester[T]) buildContractReaderConfig(t T ReadWithAddressHardCodedIntoResponse: readWithAddressHardCodedIntoResponseDef, GetTokenPrices: { ChainSpecificName: "USDPerToken", - ReadType: config.Account, - PDADefinition: codec.PDATypeDef{ + ReadType: soltypes.Account, + PDADefinition: soltypes.PDATypeDef{ Prefix: []byte("fee_billing_token_config"), - Seeds: []codec.PDASeed{ + Seeds: []soltypes.PDASeed{ { Name: "Tokens", - Type: codec.IdlType{ - AsIdlTypeVec: &codec.IdlTypeVec{ - Vec: codec.IdlType{AsString: codec.IdlTypePublicKey}, + Type: soltypes.IdlType{ + AsIdlTypeVec: &soltypes.IdlTypeVec{ + Vec: soltypes.IdlType{AsString: soltypes.IdlTypePublicKey}, }, }, }, @@ -1440,34 +1442,34 @@ func (it *SolanaChainComponentsInterfaceTester[T]) buildContractReaderConfig(t T MultiRead: multiReadDef, MultiReadWithParamsReuse: { ChainSpecificName: "MultiRead3", - PDADefinition: codec.PDATypeDef{ + PDADefinition: soltypes.PDATypeDef{ Prefix: []byte("multi_read_with_params3"), - Seeds: []codec.PDASeed{{Name: "ID", Type: codec.IdlType{AsString: codec.IdlTypeU64}}}, + Seeds: []soltypes.PDASeed{{Name: "ID", Type: soltypes.IdlType{AsString: soltypes.IdlTypeU64}}}, }, OutputModifications: commoncodec.ModifiersConfig{ &commoncodec.HardCodeModifierConfig{ OffChainValues: map[string]any{"U": "", "V": false}, }, }, - MultiReader: &config.MultiReader{ + MultiReader: &soltypes.MultiReader{ ReuseParams: true, - Reads: []config.ReadDefinition{ + Reads: []soltypes.ReadDefinition{ { ChainSpecificName: "MultiRead4", - PDADefinition: codec.PDATypeDef{ + PDADefinition: soltypes.PDATypeDef{ Prefix: []byte("multi_read_with_params4"), - Seeds: []codec.PDASeed{{Name: "ID", Type: codec.IdlType{AsString: codec.IdlTypeU64}}}, + Seeds: []soltypes.PDASeed{{Name: "ID", Type: soltypes.IdlType{AsString: soltypes.IdlTypeU64}}}, }, - ReadType: config.Account, + ReadType: soltypes.Account, }, }}, - ReadType: config.Account, + ReadType: soltypes.Account, }, MethodReturningUint64: uint64ReadDef, MethodReturningUint64Slice: { ChainSpecificName: "DataAccount", - ReadType: config.Account, - PDADefinition: codec.PDATypeDef{ + ReadType: soltypes.Account, + PDADefinition: soltypes.PDATypeDef{ Prefix: pdaDataPrefix, }, OutputModifications: commoncodec.ModifiersConfig{ @@ -1476,8 +1478,8 @@ func (it *SolanaChainComponentsInterfaceTester[T]) buildContractReaderConfig(t T }, MethodSettingUint64: { ChainSpecificName: "DataAccount", - ReadType: config.Account, - PDADefinition: codec.PDATypeDef{ + ReadType: soltypes.Account, + PDADefinition: soltypes.PDATypeDef{ Prefix: pdaDataPrefix, }, OutputModifications: commoncodec.ModifiersConfig{ @@ -1486,8 +1488,8 @@ func (it *SolanaChainComponentsInterfaceTester[T]) buildContractReaderConfig(t T }, MethodReturningSeenStruct: { ChainSpecificName: "TestStruct", - ReadType: config.Account, - PDADefinition: codec.PDATypeDef{ + ReadType: soltypes.Account, + PDADefinition: soltypes.PDATypeDef{ Prefix: pdaStructDataPrefix, }, OutputModifications: commoncodec.ModifiersConfig{ @@ -1503,14 +1505,14 @@ func (it *SolanaChainComponentsInterfaceTester[T]) buildContractReaderConfig(t T }, MethodTakingLatestParamsReturningTestStruct: { ChainSpecificName: "TestStruct", - ReadType: config.Account, + ReadType: soltypes.Account, ErrOnMissingAccountData: true, - PDADefinition: codec.PDATypeDef{ + PDADefinition: soltypes.PDATypeDef{ Prefix: pdaStructDataPrefix, - Seeds: []codec.PDASeed{ + Seeds: []soltypes.PDASeed{ { Name: "I", // this is read from params passed in while reading the account, its analogous to ListIdx which is used while writing to chain - Type: codec.IdlType{AsString: codec.IdlTypeU64}, + Type: soltypes.IdlType{AsString: soltypes.IdlTypeU64}, }, }, }, @@ -1522,21 +1524,21 @@ func (it *SolanaChainComponentsInterfaceTester[T]) buildContractReaderConfig(t T }, StateChangedEventName: { ChainSpecificName: "StateChangedEvent", - ReadType: config.Event, - EventDefinitions: &config.EventDefinitions{ - PollingFilter: &config.PollingFilter{ + ReadType: soltypes.Event, + EventDefinitions: &soltypes.EventDefinitions{ + PollingFilter: &soltypes.PollingFilter{ IncludeReverted: &trueVal, }, }, }, EventName: { ChainSpecificName: "SomeEvent", - ReadType: config.Event, - EventDefinitions: &config.EventDefinitions{ - PollingFilter: &config.PollingFilter{ + ReadType: soltypes.Event, + EventDefinitions: &soltypes.EventDefinitions{ + PollingFilter: &soltypes.PollingFilter{ IncludeReverted: &trueVal, }, - IndexedField0: &config.IndexedField{ + IndexedField0: &soltypes.IndexedField{ OffChainPath: "Field", OnChainPath: "Field", }, @@ -1556,10 +1558,10 @@ func (it *SolanaChainComponentsInterfaceTester[T]) buildContractReaderConfig(t T }, AnySecondContractName: { IDL: mustUnmarshalIDL(t, string(it.Helper.GetSecondaryIDL(t))), - Reads: map[string]config.ReadDefinition{ + Reads: map[string]soltypes.ReadDefinition{ MethodReturningUint64: { ChainSpecificName: "Data", - PDADefinition: codec.PDATypeDef{ + PDADefinition: soltypes.PDATypeDef{ Prefix: pdaDataPrefix, }, OutputModifications: commoncodec.ModifiersConfig{ @@ -1568,14 +1570,14 @@ func (it *SolanaChainComponentsInterfaceTester[T]) buildContractReaderConfig(t T }, MethodTakingLatestParamsReturningTestStruct: { ChainSpecificName: "TestStruct", - ReadType: config.Account, + ReadType: soltypes.Account, ErrOnMissingAccountData: true, - PDADefinition: codec.PDATypeDef{ + PDADefinition: soltypes.PDATypeDef{ Prefix: pdaStructDataPrefix, - Seeds: []codec.PDASeed{ + Seeds: []soltypes.PDASeed{ { Name: "I", - Type: codec.IdlType{AsString: codec.IdlTypeU64}, + Type: soltypes.IdlType{AsString: soltypes.IdlTypeU64}, }, }, }, @@ -1604,7 +1606,7 @@ const ( GetTokenPricesPubKey2 = "47XyyAALxH7WeNT1DGWsPeA8veSVJaF8MHFMqBM5DkP6" ) -func (it *SolanaChainComponentsInterfaceTester[T]) buildContractWriterConfig(t T) chainwriter.ChainWriterConfig { +func (it *SolanaChainComponentsInterfaceTester[T]) buildContractWriterConfig(t T) soltypes.ContractWriterConfig { idx := it.getTestIdx(t.Name()) testIdx := binary.LittleEndian.AppendUint64([]byte{}, idx) fromAddress := solana.MustPrivateKeyFromBase58(solclient.DefaultPrivateKeysSolValidator[1]).PublicKey().String() @@ -1613,36 +1615,36 @@ func (it *SolanaChainComponentsInterfaceTester[T]) buildContractWriterConfig(t T pubKey2, err := solana.PublicKeyFromBase58(GetTokenPricesPubKey2) require.NoError(t, err) - return chainwriter.ChainWriterConfig{ - Programs: map[string]chainwriter.ProgramConfig{ + return soltypes.ContractWriterConfig{ + Programs: map[string]soltypes.ProgramConfig{ AnyContractName: { IDL: string(it.Helper.GetPrimaryIDL(t)), - Methods: map[string]chainwriter.MethodConfig{ + Methods: map[string]soltypes.MethodConfig{ "initialize": { FromAddress: fromAddress, InputModifications: nil, ChainSpecificName: "initialize", - LookupTables: chainwriter.LookupTables{}, - Accounts: []chainwriter.Lookup{ - {AccountConstant: &chainwriter.AccountConstant{ + LookupTables: soltypes.LookupTables{}, + Accounts: []soltypes.Lookup{ + {AccountConstant: &soltypes.AccountConstant{ Name: "Signer", Address: fromAddress, IsSigner: true, IsWritable: true, }}, - {PDALookups: &chainwriter.PDALookups{ + {PDALookups: &soltypes.PDALookups{ Name: "Account", - PublicKey: chainwriter.Lookup{AccountConstant: &chainwriter.AccountConstant{ + PublicKey: soltypes.Lookup{AccountConstant: &soltypes.AccountConstant{ Address: primaryProgramPubKey, }}, - Seeds: []chainwriter.Seed{ + Seeds: []soltypes.Seed{ {Static: []byte("data")}, {Static: testIdx}, }, IsWritable: true, IsSigner: false, }}, - {AccountConstant: &chainwriter.AccountConstant{ + {AccountConstant: &soltypes.AccountConstant{ Name: "SystemProgram", Address: solana.SystemProgramID.String(), IsWritable: false, @@ -1655,39 +1657,39 @@ func (it *SolanaChainComponentsInterfaceTester[T]) buildContractWriterConfig(t T FromAddress: fromAddress, InputModifications: nil, ChainSpecificName: "initializemultiread", - LookupTables: chainwriter.LookupTables{}, - Accounts: []chainwriter.Lookup{ - {AccountConstant: &chainwriter.AccountConstant{ + LookupTables: soltypes.LookupTables{}, + Accounts: []soltypes.Lookup{ + {AccountConstant: &soltypes.AccountConstant{ Name: "Signer", Address: fromAddress, IsSigner: true, IsWritable: true, }}, - {PDALookups: &chainwriter.PDALookups{ + {PDALookups: &soltypes.PDALookups{ Name: "MultiRead1", - PublicKey: chainwriter.Lookup{AccountConstant: &chainwriter.AccountConstant{ + PublicKey: soltypes.Lookup{AccountConstant: &soltypes.AccountConstant{ Name: "ProgramID", Address: primaryProgramPubKey, }}, - Seeds: []chainwriter.Seed{ + Seeds: []soltypes.Seed{ {Static: []byte("multi_read1")}, }, IsWritable: true, IsSigner: false, }}, - {PDALookups: &chainwriter.PDALookups{ + {PDALookups: &soltypes.PDALookups{ Name: "MultiRead2", - PublicKey: chainwriter.Lookup{AccountConstant: &chainwriter.AccountConstant{ + PublicKey: soltypes.Lookup{AccountConstant: &soltypes.AccountConstant{ Name: "ProgramID", Address: primaryProgramPubKey, }}, - Seeds: []chainwriter.Seed{ + Seeds: []soltypes.Seed{ {Static: []byte("multi_read2")}, }, IsWritable: true, IsSigner: false, }}, - {AccountConstant: &chainwriter.AccountConstant{ + {AccountConstant: &soltypes.AccountConstant{ Name: "SystemProgram", Address: solana.SystemProgramID.String(), IsWritable: false, @@ -1700,41 +1702,41 @@ func (it *SolanaChainComponentsInterfaceTester[T]) buildContractWriterConfig(t T FromAddress: fromAddress, InputModifications: nil, ChainSpecificName: "initializemultireadwithparams", - LookupTables: chainwriter.LookupTables{}, - Accounts: []chainwriter.Lookup{ - {AccountConstant: &chainwriter.AccountConstant{ + LookupTables: soltypes.LookupTables{}, + Accounts: []soltypes.Lookup{ + {AccountConstant: &soltypes.AccountConstant{ Name: "Signer", Address: fromAddress, IsSigner: true, IsWritable: true, }}, - {PDALookups: &chainwriter.PDALookups{ + {PDALookups: &soltypes.PDALookups{ Name: "MultiRead3", - PublicKey: chainwriter.Lookup{AccountConstant: &chainwriter.AccountConstant{ + PublicKey: soltypes.Lookup{AccountConstant: &soltypes.AccountConstant{ Name: "ProgramID", Address: primaryProgramPubKey, }}, - Seeds: []chainwriter.Seed{ + Seeds: []soltypes.Seed{ {Static: []byte("multi_read_with_params3")}, {Static: binary.LittleEndian.AppendUint64([]byte{}, 1)}, }, IsWritable: true, IsSigner: false, }}, - {PDALookups: &chainwriter.PDALookups{ + {PDALookups: &soltypes.PDALookups{ Name: "MultiRead4", - PublicKey: chainwriter.Lookup{AccountConstant: &chainwriter.AccountConstant{ + PublicKey: soltypes.Lookup{AccountConstant: &soltypes.AccountConstant{ Name: "ProgramID", Address: primaryProgramPubKey, }}, - Seeds: []chainwriter.Seed{ + Seeds: []soltypes.Seed{ {Static: []byte("multi_read_with_params4")}, {Static: binary.LittleEndian.AppendUint64([]byte{}, 1)}, }, IsWritable: true, IsSigner: false, }}, - {AccountConstant: &chainwriter.AccountConstant{ + {AccountConstant: &soltypes.AccountConstant{ Name: "SystemProgram", Address: solana.SystemProgramID.String(), IsWritable: false, @@ -1747,41 +1749,41 @@ func (it *SolanaChainComponentsInterfaceTester[T]) buildContractWriterConfig(t T FromAddress: fromAddress, InputModifications: nil, ChainSpecificName: "initializetokenprices", - LookupTables: chainwriter.LookupTables{}, - Accounts: []chainwriter.Lookup{ - {AccountConstant: &chainwriter.AccountConstant{ + LookupTables: soltypes.LookupTables{}, + Accounts: []soltypes.Lookup{ + {AccountConstant: &soltypes.AccountConstant{ Name: "Signer", Address: fromAddress, IsSigner: true, IsWritable: true, }}, - {PDALookups: &chainwriter.PDALookups{ + {PDALookups: &soltypes.PDALookups{ Name: "BillingTokenConfigWrapper1", - PublicKey: chainwriter.Lookup{AccountConstant: &chainwriter.AccountConstant{ + PublicKey: soltypes.Lookup{AccountConstant: &soltypes.AccountConstant{ Name: "ProgramID", Address: primaryProgramPubKey, }}, - Seeds: []chainwriter.Seed{ + Seeds: []soltypes.Seed{ {Static: []byte("fee_billing_token_config")}, {Static: pubKey1.Bytes()}, }, IsWritable: true, IsSigner: false, }}, - {PDALookups: &chainwriter.PDALookups{ + {PDALookups: &soltypes.PDALookups{ Name: "BillingTokenConfigWrapper2", - PublicKey: chainwriter.Lookup{AccountConstant: &chainwriter.AccountConstant{ + PublicKey: soltypes.Lookup{AccountConstant: &soltypes.AccountConstant{ Name: "ProgramID", Address: primaryProgramPubKey, }}, - Seeds: []chainwriter.Seed{ + Seeds: []soltypes.Seed{ {Static: []byte("fee_billing_token_config")}, {Static: pubKey2.Bytes()}, }, IsWritable: true, IsSigner: false, }}, - {AccountConstant: &chainwriter.AccountConstant{ + {AccountConstant: &soltypes.AccountConstant{ Name: "SystemProgram", Address: solana.SystemProgramID.String(), IsWritable: false, @@ -1794,26 +1796,26 @@ func (it *SolanaChainComponentsInterfaceTester[T]) buildContractWriterConfig(t T FromAddress: fromAddress, InputModifications: nil, ChainSpecificName: "initializelookuptable", - LookupTables: chainwriter.LookupTables{}, - Accounts: []chainwriter.Lookup{ - {AccountConstant: &chainwriter.AccountConstant{ + LookupTables: soltypes.LookupTables{}, + Accounts: []soltypes.Lookup{ + {AccountConstant: &soltypes.AccountConstant{ Name: "Signer", Address: fromAddress, IsSigner: true, IsWritable: true, }}, - {PDALookups: &chainwriter.PDALookups{ + {PDALookups: &soltypes.PDALookups{ Name: "Account", - PublicKey: chainwriter.Lookup{AccountConstant: &chainwriter.AccountConstant{ + PublicKey: soltypes.Lookup{AccountConstant: &soltypes.AccountConstant{ Address: primaryProgramPubKey, }}, - Seeds: []chainwriter.Seed{ + Seeds: []soltypes.Seed{ {Static: []byte("lookup")}, }, IsWritable: true, IsSigner: false, }}, - {AccountConstant: &chainwriter.AccountConstant{ + {AccountConstant: &soltypes.AccountConstant{ Name: "SystemProgram", Address: solana.SystemProgramID.String(), IsWritable: false, @@ -1826,19 +1828,19 @@ func (it *SolanaChainComponentsInterfaceTester[T]) buildContractWriterConfig(t T FromAddress: fromAddress, InputModifications: nil, ChainSpecificName: "storeval", - LookupTables: chainwriter.LookupTables{ - DerivedLookupTables: []chainwriter.DerivedLookupTable{ + LookupTables: soltypes.LookupTables{ + DerivedLookupTables: []soltypes.DerivedLookupTable{ { Name: "LookupTable", - Accounts: chainwriter.Lookup{PDALookups: &chainwriter.PDALookups{ + Accounts: soltypes.Lookup{PDALookups: &soltypes.PDALookups{ Name: "LookupTableAccount", - PublicKey: chainwriter.Lookup{AccountConstant: &chainwriter.AccountConstant{ + PublicKey: soltypes.Lookup{AccountConstant: &soltypes.AccountConstant{ Address: primaryProgramPubKey, }}, - Seeds: []chainwriter.Seed{ + Seeds: []soltypes.Seed{ {Static: []byte("lookup")}, }, - InternalField: chainwriter.InternalField{ + InternalField: soltypes.InternalField{ TypeName: "LookupTableDataAccount", Location: "LookupTable", IDL: string(it.Helper.GetPrimaryIDL(t)), @@ -1847,26 +1849,26 @@ func (it *SolanaChainComponentsInterfaceTester[T]) buildContractWriterConfig(t T }, }, }, - Accounts: []chainwriter.Lookup{ - {AccountConstant: &chainwriter.AccountConstant{ + Accounts: []soltypes.Lookup{ + {AccountConstant: &soltypes.AccountConstant{ Name: "Signer", Address: fromAddress, IsSigner: true, IsWritable: true, }}, - {PDALookups: &chainwriter.PDALookups{ + {PDALookups: &soltypes.PDALookups{ Name: "Account", - PublicKey: chainwriter.Lookup{AccountConstant: &chainwriter.AccountConstant{ + PublicKey: soltypes.Lookup{AccountConstant: &soltypes.AccountConstant{ Address: primaryProgramPubKey, }}, - Seeds: []chainwriter.Seed{ + Seeds: []soltypes.Seed{ {Static: []byte("data")}, {Static: testIdx}, }, IsWritable: true, IsSigner: false, }}, - {AccountConstant: &chainwriter.AccountConstant{ + {AccountConstant: &soltypes.AccountConstant{ Name: "SystemProgram", Address: solana.SystemProgramID.String(), IsWritable: false, @@ -1878,39 +1880,39 @@ func (it *SolanaChainComponentsInterfaceTester[T]) buildContractWriterConfig(t T "storeTokenAccount": { FromAddress: fromAddress, ChainSpecificName: "storeTokenAccount", - ATAs: []chainwriter.ATALookup{ + ATAs: []soltypes.ATALookup{ { Location: "ATAInfo.Receiver", - WalletAddress: chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{Location: "ATAInfo.Wallet"}}, - TokenProgram: chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{Location: "ATAInfo.TokenProgram"}}, - MintAddress: chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{Location: "ATAInfo.Mint"}}, + WalletAddress: soltypes.Lookup{AccountLookup: &soltypes.AccountLookup{Location: "ATAInfo.Wallet"}}, + TokenProgram: soltypes.Lookup{AccountLookup: &soltypes.AccountLookup{Location: "ATAInfo.TokenProgram"}}, + MintAddress: soltypes.Lookup{AccountLookup: &soltypes.AccountLookup{Location: "ATAInfo.Mint"}}, }, }, - Accounts: []chainwriter.Lookup{ - {AccountConstant: &chainwriter.AccountConstant{ + Accounts: []soltypes.Lookup{ + {AccountConstant: &soltypes.AccountConstant{ Name: "Signer", Address: fromAddress, IsSigner: true, IsWritable: true, }}, - {AccountLookup: &chainwriter.AccountLookup{ + {AccountLookup: &soltypes.AccountLookup{ Location: "TokenAccount", - IsWritable: chainwriter.MetaBool{Value: true}, - IsSigner: chainwriter.MetaBool{Value: false}, + IsWritable: soltypes.MetaBool{Value: true}, + IsSigner: soltypes.MetaBool{Value: false}, }}, - {PDALookups: &chainwriter.PDALookups{ + {PDALookups: &soltypes.PDALookups{ Name: "Account", - PublicKey: chainwriter.Lookup{AccountConstant: &chainwriter.AccountConstant{ + PublicKey: soltypes.Lookup{AccountConstant: &soltypes.AccountConstant{ Address: primaryProgramPubKey, }}, - Seeds: []chainwriter.Seed{ + Seeds: []soltypes.Seed{ {Static: []byte("token_account")}, {Static: testIdx}, }, IsWritable: true, IsSigner: false, }}, - {AccountConstant: &chainwriter.AccountConstant{ + {AccountConstant: &soltypes.AccountConstant{ Name: "SystemProgram", Address: solana.SystemProgramID.String(), IsWritable: false, @@ -1932,25 +1934,25 @@ func (it *SolanaChainComponentsInterfaceTester[T]) buildContractWriterConfig(t T }, }, ChainSpecificName: "store", - LookupTables: chainwriter.LookupTables{}, - Accounts: []chainwriter.Lookup{ - {AccountConstant: &chainwriter.AccountConstant{ + LookupTables: soltypes.LookupTables{}, + Accounts: []soltypes.Lookup{ + {AccountConstant: &soltypes.AccountConstant{ Name: "Signer", Address: fromAddress, IsSigner: true, IsWritable: true, }}, - {PDALookups: &chainwriter.PDALookups{ + {PDALookups: &soltypes.PDALookups{ Name: "Account", - PublicKey: chainwriter.Lookup{AccountConstant: &chainwriter.AccountConstant{ + PublicKey: soltypes.Lookup{AccountConstant: &soltypes.AccountConstant{ Name: "ProgramID", Address: primaryProgramPubKey, }}, - Seeds: []chainwriter.Seed{ + Seeds: []soltypes.Seed{ {Static: []byte("struct_data")}, {Static: testIdx}, - {Dynamic: chainwriter.Lookup{ - AccountLookup: &chainwriter.AccountLookup{ + {Dynamic: soltypes.Lookup{ + AccountLookup: &soltypes.AccountLookup{ Location: "ListIdx", // this will be sent as input params while writing to chain, see StoreTestStruct }, }}, @@ -1958,7 +1960,7 @@ func (it *SolanaChainComponentsInterfaceTester[T]) buildContractWriterConfig(t T IsWritable: true, IsSigner: false, }}, - {AccountConstant: &chainwriter.AccountConstant{ + {AccountConstant: &soltypes.AccountConstant{ Name: "SystemProgram", Address: solana.SystemProgramID.String(), IsWritable: false, @@ -1970,15 +1972,15 @@ func (it *SolanaChainComponentsInterfaceTester[T]) buildContractWriterConfig(t T MethodTriggeringEventBeforeFailing: { FromAddress: fromAddress, ChainSpecificName: "createEventAndFail", - LookupTables: chainwriter.LookupTables{}, - Accounts: []chainwriter.Lookup{ - {AccountConstant: &chainwriter.AccountConstant{ + LookupTables: soltypes.LookupTables{}, + Accounts: []soltypes.Lookup{ + {AccountConstant: &soltypes.AccountConstant{ Name: "Signer", Address: fromAddress, IsSigner: true, IsWritable: true, }}, - {AccountConstant: &chainwriter.AccountConstant{ + {AccountConstant: &soltypes.AccountConstant{ Name: "SystemProgram", Address: solana.SystemProgramID.String(), IsWritable: false, @@ -1995,15 +1997,15 @@ func (it *SolanaChainComponentsInterfaceTester[T]) buildContractWriterConfig(t T Fields: []string{"Data.AccountStruct.AccountStr"}, }, }, - LookupTables: chainwriter.LookupTables{}, - Accounts: []chainwriter.Lookup{ - {AccountConstant: &chainwriter.AccountConstant{ + LookupTables: soltypes.LookupTables{}, + Accounts: []soltypes.Lookup{ + {AccountConstant: &soltypes.AccountConstant{ Name: "Signer", Address: fromAddress, IsSigner: true, IsWritable: true, }}, - {AccountConstant: &chainwriter.AccountConstant{ + {AccountConstant: &soltypes.AccountConstant{ Name: "SystemProgram", Address: solana.SystemProgramID.String(), IsWritable: false, @@ -2016,35 +2018,35 @@ func (it *SolanaChainComponentsInterfaceTester[T]) buildContractWriterConfig(t T }, AnySecondContractName: { IDL: string(it.Helper.GetSecondaryIDL(t)), - Methods: map[string]chainwriter.MethodConfig{ + Methods: map[string]soltypes.MethodConfig{ "initialize": { FromAddress: fromAddress, InputModifications: nil, ChainSpecificName: "initialize", - LookupTables: chainwriter.LookupTables{}, - Accounts: []chainwriter.Lookup{ - {AccountConstant: &chainwriter.AccountConstant{ + LookupTables: soltypes.LookupTables{}, + Accounts: []soltypes.Lookup{ + {AccountConstant: &soltypes.AccountConstant{ Name: "Signer", Address: fromAddress, IsSigner: true, IsWritable: true, }}, - {PDALookups: &chainwriter.PDALookups{ + {PDALookups: &soltypes.PDALookups{ Name: "Account", - PublicKey: chainwriter.Lookup{ - AccountConstant: &chainwriter.AccountConstant{ + PublicKey: soltypes.Lookup{ + AccountConstant: &soltypes.AccountConstant{ Name: "ProgramID", Address: secondaryProgramPubKey, // line ~1338 }, // line ~1339 closes AccountConstant - }, // line ~1340 closes chainwriter.Lookup - Seeds: []chainwriter.Seed{ + }, // line ~1340 closes soltypes.Lookup + Seeds: []soltypes.Seed{ {Static: []byte("data")}, {Static: testIdx}, }, IsWritable: true, IsSigner: false, }}, - {AccountConstant: &chainwriter.AccountConstant{ + {AccountConstant: &soltypes.AccountConstant{ Name: "SystemAccount", Address: solana.SystemProgramID.String(), IsWritable: false, @@ -2066,25 +2068,25 @@ func (it *SolanaChainComponentsInterfaceTester[T]) buildContractWriterConfig(t T }, }, ChainSpecificName: "store", - LookupTables: chainwriter.LookupTables{}, - Accounts: []chainwriter.Lookup{ - {AccountConstant: &chainwriter.AccountConstant{ + LookupTables: soltypes.LookupTables{}, + Accounts: []soltypes.Lookup{ + {AccountConstant: &soltypes.AccountConstant{ Name: "Signer", Address: fromAddress, IsSigner: true, IsWritable: true, }}, - {PDALookups: &chainwriter.PDALookups{ + {PDALookups: &soltypes.PDALookups{ Name: "Account", - PublicKey: chainwriter.Lookup{AccountConstant: &chainwriter.AccountConstant{ + PublicKey: soltypes.Lookup{AccountConstant: &soltypes.AccountConstant{ Name: "ProgramID", Address: secondaryProgramPubKey, }}, - Seeds: []chainwriter.Seed{ + Seeds: []soltypes.Seed{ {Static: []byte("struct_data")}, {Static: testIdx}, - {Dynamic: chainwriter.Lookup{ - AccountLookup: &chainwriter.AccountLookup{ + {Dynamic: soltypes.Lookup{ + AccountLookup: &soltypes.AccountLookup{ Location: "ListIdx", }, }}, @@ -2092,7 +2094,7 @@ func (it *SolanaChainComponentsInterfaceTester[T]) buildContractWriterConfig(t T IsWritable: true, IsSigner: false, }}, - {AccountConstant: &chainwriter.AccountConstant{ + {AccountConstant: &soltypes.AccountConstant{ Name: "SystemProgram", Address: solana.SystemProgramID.String(), IsWritable: false, diff --git a/integration-tests/relayinterface/lookups_test.go b/integration-tests/relayinterface/lookups_test.go index 1bc7acdde..27bb836d5 100644 --- a/integration-tests/relayinterface/lookups_test.go +++ b/integration-tests/relayinterface/lookups_test.go @@ -14,6 +14,7 @@ import ( "github.com/smartcontractkit/chainlink-ccip/chains/solana/utils/tokens" "github.com/smartcontractkit/chainlink-common/pkg/logger" ccipocr3common "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" + soltypes "github.com/smartcontractkit/chainlink-common/pkg/types/solana" "github.com/smartcontractkit/chainlink-solana/integration-tests/utils" "github.com/smartcontractkit/chainlink-solana/pkg/solana/chainwriter" @@ -38,11 +39,11 @@ var testContractIDL = chainwriter.FetchTestContractIDL() func TestLookup(t *testing.T) { t.Run("Resolve fails on a lookup with multiple lookup types", func(t *testing.T) { lookupConfig := chainwriter.Lookup{ - AccountConstant: &chainwriter.AccountConstant{ + AccountConstant: &soltypes.AccountConstant{ Name: "TestAccount", Address: "test", }, - AccountLookup: &chainwriter.AccountLookup{ + AccountLookup: &soltypes.AccountLookup{ Name: "TestAccount", Location: "test", }, @@ -62,13 +63,13 @@ func TestAccountContant(t *testing.T) { IsWritable: true, }, } - constantConfig := chainwriter.Lookup{AccountConstant: &chainwriter.AccountConstant{ + constantConfig := chainwriter.Lookup{AccountConstant: &soltypes.AccountConstant{ Name: "TestAccount", Address: expectedAddr.String(), IsSigner: true, IsWritable: true, }} - result, err := constantConfig.AccountConstant.Resolve() + result, err := chainwriter.ResolveAccountConstant(constantConfig.AccountConstant) require.NoError(t, err) require.Equal(t, expectedMeta, result) }) @@ -89,13 +90,13 @@ func TestAccountLookups(t *testing.T) { }, } - lookupConfig := chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{ + lookupConfig := chainwriter.Lookup{AccountLookup: &soltypes.AccountLookup{ Name: "TestAccount", Location: "Inner.Address", - IsSigner: chainwriter.MetaBool{Value: true}, - IsWritable: chainwriter.MetaBool{Value: true}, + IsSigner: soltypes.MetaBool{Value: true}, + IsWritable: soltypes.MetaBool{Value: true}, }} - result, err := lookupConfig.AccountLookup.Resolve(testArgs) + result, err := chainwriter.ResolveAccountLookup(lookupConfig.AccountLookup, testArgs) require.NoError(t, err) require.Equal(t, expectedMeta, result) }) @@ -123,13 +124,13 @@ func TestAccountLookups(t *testing.T) { }, } - lookupConfig := chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{ + lookupConfig := chainwriter.Lookup{AccountLookup: &soltypes.AccountLookup{ Name: "TestAccount", Location: "Inner.Address", - IsSigner: chainwriter.MetaBool{Value: true}, - IsWritable: chainwriter.MetaBool{Value: true}, + IsSigner: soltypes.MetaBool{Value: true}, + IsWritable: soltypes.MetaBool{Value: true}, }} - result, err := lookupConfig.AccountLookup.Resolve(testArgs) + result, err := chainwriter.ResolveAccountLookup(lookupConfig.AccountLookup, testArgs) require.NoError(t, err) for i, meta := range result { require.Equal(t, expectedMeta[i], meta) @@ -144,13 +145,13 @@ func TestAccountLookups(t *testing.T) { {Address: expectedAddr.Bytes()}, }, } - lookupConfig := chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{ + lookupConfig := chainwriter.Lookup{AccountLookup: &soltypes.AccountLookup{ Name: "InvalidAccount", Location: "Invalid.Directory", - IsSigner: chainwriter.MetaBool{Value: true}, - IsWritable: chainwriter.MetaBool{Value: true}, + IsSigner: soltypes.MetaBool{Value: true}, + IsWritable: soltypes.MetaBool{Value: true}, }} - _, err := lookupConfig.AccountLookup.Resolve(testArgs) + _, err := chainwriter.ResolveAccountLookup(lookupConfig.AccountLookup, testArgs) require.ErrorIs(t, err, chainwriter.ErrLookupNotFoundAtLocation) }) @@ -165,11 +166,11 @@ func TestAccountLookups(t *testing.T) { } } - lookupConfig := chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{ + lookupConfig := chainwriter.Lookup{AccountLookup: &soltypes.AccountLookup{ Name: "TestAccount", Location: "Inner.Accounts.PublicKey", - IsSigner: chainwriter.MetaBool{BitmapLocation: "Inner.Bitmap"}, - IsWritable: chainwriter.MetaBool{BitmapLocation: "Inner.Bitmap"}, + IsSigner: soltypes.MetaBool{BitmapLocation: "Inner.Bitmap"}, + IsWritable: soltypes.MetaBool{BitmapLocation: "Inner.Bitmap"}, }} args := TestAccountArgs{ @@ -180,7 +181,7 @@ func TestAccountLookups(t *testing.T) { }, } - result, err := lookupConfig.AccountLookup.Resolve(args) + result, err := chainwriter.ResolveAccountLookup(lookupConfig.AccountLookup, args) require.NoError(t, err) for i, meta := range result { @@ -204,11 +205,11 @@ func TestAccountLookups(t *testing.T) { } } - lookupConfig := chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{ + lookupConfig := chainwriter.Lookup{AccountLookup: &soltypes.AccountLookup{ Name: "InvalidAccount", Location: "Inner.Accounts.PublicKey", - IsSigner: chainwriter.MetaBool{BitmapLocation: "Bitmaps"}, - IsWritable: chainwriter.MetaBool{BitmapLocation: "Bitmaps"}, + IsSigner: soltypes.MetaBool{BitmapLocation: "Bitmaps"}, + IsWritable: soltypes.MetaBool{BitmapLocation: "Bitmaps"}, }} args := TestAccountArgsExtended{ @@ -218,7 +219,7 @@ func TestAccountLookups(t *testing.T) { Bitmaps: []uint64{5, 3}, } - _, err := lookupConfig.AccountLookup.Resolve(args) + _, err := chainwriter.ResolveAccountLookup(lookupConfig.AccountLookup, args) require.Contains(t, err.Error(), "bitmap value is not a single value") }) @@ -232,11 +233,11 @@ func TestAccountLookups(t *testing.T) { } } - lookupConfig := chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{ + lookupConfig := chainwriter.Lookup{AccountLookup: &soltypes.AccountLookup{ Name: "InvalidAccount", Location: "Inner.Accounts.PublicKey", - IsSigner: chainwriter.MetaBool{BitmapLocation: "Invalid.Bitmap"}, - IsWritable: chainwriter.MetaBool{BitmapLocation: "Invalid.Bitmap"}, + IsSigner: soltypes.MetaBool{BitmapLocation: "Invalid.Bitmap"}, + IsWritable: soltypes.MetaBool{BitmapLocation: "Invalid.Bitmap"}, }} args := TestAccountArgs{ @@ -245,7 +246,7 @@ func TestAccountLookups(t *testing.T) { }, } - _, err := lookupConfig.AccountLookup.Resolve(args) + _, err := chainwriter.ResolveAccountLookup(lookupConfig.AccountLookup, args) require.Contains(t, err.Error(), "error reading bitmap from location") }) @@ -259,11 +260,11 @@ func TestAccountLookups(t *testing.T) { } } - lookupConfig := chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{ + lookupConfig := chainwriter.Lookup{AccountLookup: &soltypes.AccountLookup{ Name: "InvalidAccount", Location: "Inner.Accounts.PublicKey", - IsSigner: chainwriter.MetaBool{BitmapLocation: "Inner"}, - IsWritable: chainwriter.MetaBool{BitmapLocation: "Inner"}, + IsSigner: soltypes.MetaBool{BitmapLocation: "Inner"}, + IsWritable: soltypes.MetaBool{BitmapLocation: "Inner"}, }} args := TestAccountArgs{ @@ -272,7 +273,7 @@ func TestAccountLookups(t *testing.T) { }, } - _, err := lookupConfig.AccountLookup.Resolve(args) + _, err := chainwriter.ResolveAccountLookup(lookupConfig.AccountLookup, args) require.Contains(t, err.Error(), "invalid value format at path") }) @@ -286,18 +287,18 @@ func TestAccountLookups(t *testing.T) { } } - lookupConfig := chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{ + lookupConfig := chainwriter.Lookup{AccountLookup: &soltypes.AccountLookup{ Name: "TestAccount", Location: "Inner.Accounts.PublicKey", - IsSigner: chainwriter.MetaBool{Value: true}, - IsWritable: chainwriter.MetaBool{Value: true}, + IsSigner: soltypes.MetaBool{Value: true}, + IsWritable: soltypes.MetaBool{Value: true}, }} args := TestAccountArgs{ Inner: InnerAccountArgs{ Accounts: accounts[:], }, } - _, err := lookupConfig.AccountLookup.Resolve(args) + _, err := chainwriter.ResolveAccountLookup(lookupConfig.AccountLookup, args) require.Error(t, err) }) @@ -312,11 +313,11 @@ func TestAccountLookups(t *testing.T) { } } - lookupConfig := chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{ + lookupConfig := chainwriter.Lookup{AccountLookup: &soltypes.AccountLookup{ Name: "TestAccount", Location: "Accounts.PublicKey", - IsSigner: chainwriter.MetaBool{BitmapLocation: "Bitmap"}, - IsWritable: chainwriter.MetaBool{BitmapLocation: "Bitmap"}, + IsSigner: soltypes.MetaBool{BitmapLocation: "Bitmap"}, + IsWritable: soltypes.MetaBool{BitmapLocation: "Bitmap"}, }} args := struct { @@ -327,7 +328,7 @@ func TestAccountLookups(t *testing.T) { Bitmap: make([]byte, 3), // invalid bitmap length } - _, err := lookupConfig.AccountLookup.Resolve(args) + _, err := chainwriter.ResolveAccountLookup(lookupConfig.AccountLookup, args) require.Error(t, err) }) } @@ -350,11 +351,11 @@ func TestPDALookups(t *testing.T) { }, } - pdaLookup := chainwriter.Lookup{PDALookups: &chainwriter.PDALookups{ + pdaLookup := chainwriter.Lookup{PDALookups: &soltypes.PDALookups{ Name: "TestPDA", - PublicKey: chainwriter.Lookup{AccountConstant: &chainwriter.AccountConstant{Name: "ProgramID", Address: programID.String()}}, - Seeds: []chainwriter.Seed{ - {Dynamic: chainwriter.Lookup{AccountConstant: &chainwriter.AccountConstant{Name: "seed", Address: seed.String()}}}, + PublicKey: soltypes.Lookup{AccountConstant: &soltypes.AccountConstant{Name: "ProgramID", Address: programID.String()}}, + Seeds: []soltypes.Seed{ + {Dynamic: soltypes.Lookup{AccountConstant: &soltypes.AccountConstant{Name: "seed", Address: seed.String()}}}, }, IsSigner: false, IsWritable: true, @@ -385,14 +386,14 @@ func TestPDALookups(t *testing.T) { }, } - pdaLookup := chainwriter.Lookup{PDALookups: &chainwriter.PDALookups{ + pdaLookup := chainwriter.Lookup{PDALookups: &soltypes.PDALookups{ Name: "TestPDA", - PublicKey: chainwriter.Lookup{AccountConstant: &chainwriter.AccountConstant{Name: "ProgramID", Address: programID.String()}}, - Seeds: []chainwriter.Seed{ - {Dynamic: chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{Name: "seed1", Location: "test_seed"}}}, - {Dynamic: chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{Name: "seed2", Location: "another_seed"}}}, - {Dynamic: chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{Name: "seed3", Location: "ccip_chain_selector"}}}, - {Dynamic: chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{Name: "seed4", Location: "ccip_bytes"}}}, + PublicKey: soltypes.Lookup{AccountConstant: &soltypes.AccountConstant{Name: "ProgramID", Address: programID.String()}}, + Seeds: []soltypes.Seed{ + {Dynamic: soltypes.Lookup{AccountLookup: &soltypes.AccountLookup{Name: "seed1", Location: "test_seed"}}}, + {Dynamic: soltypes.Lookup{AccountLookup: &soltypes.AccountLookup{Name: "seed2", Location: "another_seed"}}}, + {Dynamic: soltypes.Lookup{AccountLookup: &soltypes.AccountLookup{Name: "seed3", Location: "ccip_chain_selector"}}}, + {Dynamic: soltypes.Lookup{AccountLookup: &soltypes.AccountLookup{Name: "seed4", Location: "ccip_bytes"}}}, }, IsSigner: false, IsWritable: true, @@ -411,11 +412,11 @@ func TestPDALookups(t *testing.T) { }) t.Run("PDALookup fails with missing seeds", func(t *testing.T) { - pdaLookup := chainwriter.Lookup{PDALookups: &chainwriter.PDALookups{ + pdaLookup := chainwriter.Lookup{PDALookups: &soltypes.PDALookups{ Name: "TestPDA", - PublicKey: chainwriter.Lookup{AccountConstant: &chainwriter.AccountConstant{Name: "ProgramID", Address: programID.String()}}, - Seeds: []chainwriter.Seed{ - {Dynamic: chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{Name: "seed1", Location: "MissingSeed"}}}, + PublicKey: soltypes.Lookup{AccountConstant: &soltypes.AccountConstant{Name: "ProgramID", Address: programID.String()}}, + Seeds: []soltypes.Seed{ + {Dynamic: soltypes.Lookup{AccountLookup: &soltypes.AccountLookup{Name: "seed1", Location: "MissingSeed"}}}, }, IsSigner: false, IsWritable: true, @@ -446,13 +447,13 @@ func TestPDALookups(t *testing.T) { }, } - pdaLookup := chainwriter.Lookup{PDALookups: &chainwriter.PDALookups{ + pdaLookup := chainwriter.Lookup{PDALookups: &soltypes.PDALookups{ Name: "TestPDA", - PublicKey: chainwriter.Lookup{AccountConstant: &chainwriter.AccountConstant{Name: "ProgramID", Address: programID.String()}}, - Seeds: []chainwriter.Seed{ - {Dynamic: chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{Name: "seed1", Location: "test_seed"}}}, - {Dynamic: chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{Name: "seed2", Location: "another_seed"}}}, - {Dynamic: chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{Name: "seed3", Location: "unknown_encoded_address"}}}, + PublicKey: soltypes.Lookup{AccountConstant: &soltypes.AccountConstant{Name: "ProgramID", Address: programID.String()}}, + Seeds: []soltypes.Seed{ + {Dynamic: soltypes.Lookup{AccountLookup: &soltypes.AccountLookup{Name: "seed1", Location: "test_seed"}}}, + {Dynamic: soltypes.Lookup{AccountLookup: &soltypes.AccountLookup{Name: "seed2", Location: "another_seed"}}}, + {Dynamic: soltypes.Lookup{AccountLookup: &soltypes.AccountLookup{Name: "seed3", Location: "unknown_encoded_address"}}}, }, IsSigner: false, IsWritable: true, @@ -486,12 +487,12 @@ func TestPDALookups(t *testing.T) { expectedMeta = append(expectedMeta, meta) } - pdaLookup := chainwriter.Lookup{PDALookups: &chainwriter.PDALookups{ + pdaLookup := chainwriter.Lookup{PDALookups: &soltypes.PDALookups{ Name: "TestPDA", - PublicKey: chainwriter.Lookup{AccountConstant: &chainwriter.AccountConstant{Name: "ProgramID", Address: programID.String()}}, - Seeds: []chainwriter.Seed{ - {Dynamic: chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{Name: "seed1", Location: "single_seed"}}}, - {Dynamic: chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{Name: "seed2", Location: "array_seed"}}}, + PublicKey: soltypes.Lookup{AccountConstant: &soltypes.AccountConstant{Name: "ProgramID", Address: programID.String()}}, + Seeds: []soltypes.Seed{ + {Dynamic: soltypes.Lookup{AccountLookup: &soltypes.AccountLookup{Name: "seed1", Location: "single_seed"}}}, + {Dynamic: soltypes.Lookup{AccountLookup: &soltypes.AccountLookup{Name: "seed2", Location: "array_seed"}}}, }, IsSigner: false, IsWritable: false, @@ -526,12 +527,12 @@ func TestPDALookups(t *testing.T) { } } - pdaLookup := chainwriter.Lookup{PDALookups: &chainwriter.PDALookups{ + pdaLookup := chainwriter.Lookup{PDALookups: &soltypes.PDALookups{ Name: "TestPDA", - PublicKey: chainwriter.Lookup{AccountConstant: &chainwriter.AccountConstant{Name: "ProgramID", Address: programID.String()}}, - Seeds: []chainwriter.Seed{ - {Dynamic: chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{Name: "seed1", Location: "seed1"}}}, - {Dynamic: chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{Name: "seed2", Location: "seed2"}}}, + PublicKey: soltypes.Lookup{AccountConstant: &soltypes.AccountConstant{Name: "ProgramID", Address: programID.String()}}, + Seeds: []soltypes.Seed{ + {Dynamic: soltypes.Lookup{AccountLookup: &soltypes.AccountLookup{Name: "seed1", Location: "seed1"}}}, + {Dynamic: soltypes.Lookup{AccountLookup: &soltypes.AccountLookup{Name: "seed2", Location: "seed2"}}}, }, IsSigner: false, IsWritable: false, @@ -574,15 +575,15 @@ func TestLookupTables(t *testing.T) { txm, err := txm.NewTxm("localnet", loader, nil, cfg, mkey, lggr) require.NoError(t, err) - cw, err := chainwriter.NewSolanaChainWriterService(logger.Test(t), multiClient, txm, nil, chainwriter.ChainWriterConfig{}) + cw, err := chainwriter.NewSolanaChainWriterService(logger.Test(t), multiClient, txm, nil, soltypes.ContractWriterConfig{}) require.NoError(t, err) t.Run("StaticLookup table resolves properly", func(t *testing.T) { pubKeys := CreateTestPubKeys(t, 8) table := utils.CreateTestLookupTable(t, rpcClient, sender, pubKeys) - lookupConfig := chainwriter.LookupTables{ + lookupConfig := soltypes.LookupTables{ DerivedLookupTables: nil, - StaticLookupTables: []solana.PublicKey{table}, + StaticLookupTables: [][32]byte{table}, } _, staticTableMap, resolveErr := cw.ResolveLookupTables(ctx, nil, lookupConfig) require.NoError(t, resolveErr) @@ -591,11 +592,11 @@ func TestLookupTables(t *testing.T) { t.Run("Derived lookup table resolves properly with constant address", func(t *testing.T) { pubKeys := CreateTestPubKeys(t, 8) table := utils.CreateTestLookupTable(t, rpcClient, sender, pubKeys) - lookupConfig := chainwriter.LookupTables{ - DerivedLookupTables: []chainwriter.DerivedLookupTable{ + lookupConfig := soltypes.LookupTables{ + DerivedLookupTables: []soltypes.DerivedLookupTable{ { Name: "DerivedTable", - Accounts: chainwriter.Lookup{AccountConstant: &chainwriter.AccountConstant{ + Accounts: soltypes.Lookup{AccountConstant: &soltypes.AccountConstant{ Name: "TestLookupTable", Address: table.String(), IsSigner: true, @@ -618,11 +619,11 @@ func TestLookupTables(t *testing.T) { t.Run("Derived lookup table fails with invalid address", func(t *testing.T) { invalidTable := utils.GetRandomPubKey(t) - lookupConfig := chainwriter.LookupTables{ - DerivedLookupTables: []chainwriter.DerivedLookupTable{ + lookupConfig := soltypes.LookupTables{ + DerivedLookupTables: []soltypes.DerivedLookupTable{ { Name: "DerivedTable", - Accounts: chainwriter.Lookup{AccountConstant: &chainwriter.AccountConstant{ + Accounts: soltypes.Lookup{AccountConstant: &soltypes.AccountConstant{ Name: "InvalidTable", Address: invalidTable.String(), IsSigner: true, @@ -644,7 +645,7 @@ func TestLookupTables(t *testing.T) { "DerivedTable": {}, } accountsFromLookupTable := chainwriter.Lookup{ - AccountsFromLookupTable: &chainwriter.AccountsFromLookupTable{ + AccountsFromLookupTable: &soltypes.AccountsFromLookupTable{ LookupTableName: "InvalidTable", IncludeIndexes: []int{}, }, @@ -657,9 +658,9 @@ func TestLookupTables(t *testing.T) { t.Run("Static lookup table fails with invalid address", func(t *testing.T) { invalidTable := utils.GetRandomPubKey(t) - lookupConfig := chainwriter.LookupTables{ + lookupConfig := soltypes.LookupTables{ DerivedLookupTables: nil, - StaticLookupTables: []solana.PublicKey{invalidTable}, + StaticLookupTables: [][32]byte{invalidTable}, } _, _, err = cw.ResolveLookupTables(ctx, nil, lookupConfig) @@ -670,14 +671,14 @@ func TestLookupTables(t *testing.T) { t.Run("Derived lookup table resolves properly with account lookup address", func(t *testing.T) { pubKeys := CreateTestPubKeys(t, 8) table := utils.CreateTestLookupTable(t, rpcClient, sender, pubKeys) - lookupConfig := chainwriter.LookupTables{ - DerivedLookupTables: []chainwriter.DerivedLookupTable{ + lookupConfig := soltypes.LookupTables{ + DerivedLookupTables: []soltypes.DerivedLookupTable{ { Name: "DerivedTable", - Accounts: chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{ + Accounts: soltypes.Lookup{AccountLookup: &soltypes.AccountLookup{ Name: "TestLookupTable", Location: "Inner.Address", - IsSigner: chainwriter.MetaBool{Value: true}, + IsSigner: soltypes.MetaBool{Value: true}, }}, }, }, @@ -694,7 +695,7 @@ func TestLookupTables(t *testing.T) { require.NoError(t, err) accountsFromLookupTable := chainwriter.Lookup{ - AccountsFromLookupTable: &chainwriter.AccountsFromLookupTable{ + AccountsFromLookupTable: &soltypes.AccountsFromLookupTable{ LookupTableName: "DerivedTable", IncludeIndexes: []int{}, }, @@ -720,19 +721,19 @@ func TestLookupTables(t *testing.T) { "seed1": []byte("lookup"), } - lookupConfig := chainwriter.LookupTables{ - DerivedLookupTables: []chainwriter.DerivedLookupTable{ + lookupConfig := soltypes.LookupTables{ + DerivedLookupTables: []soltypes.DerivedLookupTable{ { Name: "DerivedTable", - Accounts: chainwriter.Lookup{PDALookups: &chainwriter.PDALookups{ + Accounts: soltypes.Lookup{PDALookups: &soltypes.PDALookups{ Name: "DataAccountPDA", - PublicKey: chainwriter.Lookup{AccountConstant: &chainwriter.AccountConstant{Name: "WriteTest", Address: programID.String()}}, - Seeds: []chainwriter.Seed{ - {Dynamic: chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{Name: "seed1", Location: "seed1"}}}, + PublicKey: soltypes.Lookup{AccountConstant: &soltypes.AccountConstant{Name: "WriteTest", Address: programID.String()}}, + Seeds: []soltypes.Seed{ + {Dynamic: soltypes.Lookup{AccountLookup: &soltypes.AccountLookup{Name: "seed1", Location: "seed1"}}}, }, IsSigner: false, IsWritable: false, - InternalField: chainwriter.InternalField{ + InternalField: soltypes.InternalField{ TypeName: "LookupTableDataAccount", Location: "LookupTable", IDL: testContractIDL, @@ -747,7 +748,7 @@ func TestLookupTables(t *testing.T) { require.NoError(t, err) accountsFromLookupTable := chainwriter.Lookup{ - AccountsFromLookupTable: &chainwriter.AccountsFromLookupTable{ + AccountsFromLookupTable: &soltypes.AccountsFromLookupTable{ LookupTableName: "DerivedTable", IncludeIndexes: []int{}, }, @@ -768,19 +769,19 @@ func TestLookupTables(t *testing.T) { "seed1": []byte("lookup"), } - lookupConfig := chainwriter.LookupTables{ - DerivedLookupTables: []chainwriter.DerivedLookupTable{ + lookupConfig := soltypes.LookupTables{ + DerivedLookupTables: []soltypes.DerivedLookupTable{ { Name: "DerivedTable", - Accounts: chainwriter.Lookup{PDALookups: &chainwriter.PDALookups{ + Accounts: soltypes.Lookup{PDALookups: &soltypes.PDALookups{ Name: "DataAccountPDA", - PublicKey: chainwriter.Lookup{AccountConstant: &chainwriter.AccountConstant{Name: "WriteTest", Address: programID.String()}}, - Seeds: []chainwriter.Seed{ - {Dynamic: chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{Name: "missing_seed", Location: "missing_seed"}}}, + PublicKey: soltypes.Lookup{AccountConstant: &soltypes.AccountConstant{Name: "WriteTest", Address: programID.String()}}, + Seeds: []soltypes.Seed{ + {Dynamic: soltypes.Lookup{AccountLookup: &soltypes.AccountLookup{Name: "missing_seed", Location: "missing_seed"}}}, }, IsSigner: false, IsWritable: false, - InternalField: chainwriter.InternalField{ + InternalField: soltypes.InternalField{ TypeName: "LookupTableDataAccount", Location: "LookupTable", IDL: testContractIDL, @@ -794,13 +795,13 @@ func TestLookupTables(t *testing.T) { derivedTableMap, _, err := cw.ResolveLookupTables(ctx, args, lookupConfig) require.NoError(t, err) - pdaWithAccountLookupSeed := chainwriter.Lookup{ - PDALookups: &chainwriter.PDALookups{ - PublicKey: chainwriter.Lookup{AccountConstant: &chainwriter.AccountConstant{Address: utils.GetRandomPubKey(t).String()}}, - Seeds: []chainwriter.Seed{ + pdaWithAccountLookupSeed := soltypes.Lookup{ + PDALookups: &soltypes.PDALookups{ + PublicKey: soltypes.Lookup{AccountConstant: &soltypes.AccountConstant{Address: utils.GetRandomPubKey(t).String()}}, + Seeds: []soltypes.Seed{ { - Dynamic: chainwriter.Lookup{ - AccountsFromLookupTable: &chainwriter.AccountsFromLookupTable{ + Dynamic: soltypes.Lookup{ + AccountsFromLookupTable: &soltypes.AccountsFromLookupTable{ LookupTableName: "DerivedTable", IncludeIndexes: []int{}, }, @@ -811,7 +812,7 @@ func TestLookupTables(t *testing.T) { Optional: true, } - accounts, err := chainwriter.GetAddresses(ctx, nil, []chainwriter.Lookup{pdaWithAccountLookupSeed}, derivedTableMap, multiClient) + accounts, err := chainwriter.GetAddresses(ctx, nil, []soltypes.Lookup{pdaWithAccountLookupSeed}, derivedTableMap, multiClient) require.NoError(t, err) require.Empty(t, accounts) }) @@ -905,13 +906,13 @@ func TestCreateATAs(t *testing.T) { t.Run("returns no instructions when no ATA location is found", func(t *testing.T) { user := utils.GetRandomPubKey(t) - lookups := []chainwriter.ATALookup{ + lookups := []soltypes.ATALookup{ { Location: "Invalid.Address", - WalletAddress: chainwriter.Lookup{AccountConstant: &chainwriter.AccountConstant{ + WalletAddress: soltypes.Lookup{AccountConstant: &soltypes.AccountConstant{ Address: user.String(), }}, - MintAddress: chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{ + MintAddress: soltypes.Lookup{AccountLookup: &soltypes.AccountLookup{ Location: "Invalid.Address", }}, }, @@ -929,13 +930,13 @@ func TestCreateATAs(t *testing.T) { }) t.Run("fails with multiple wallet addresses", func(t *testing.T) { - lookups := []chainwriter.ATALookup{ + lookups := []soltypes.ATALookup{ { Location: "", - WalletAddress: chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{ + WalletAddress: soltypes.Lookup{AccountLookup: &soltypes.AccountLookup{ Location: "Addresses", }}, - MintAddress: chainwriter.Lookup{AccountConstant: &chainwriter.AccountConstant{ + MintAddress: soltypes.Lookup{AccountConstant: &soltypes.AccountConstant{ Address: mint1.String(), }}, }, @@ -954,13 +955,13 @@ func TestCreateATAs(t *testing.T) { ataAddress, _, err := tokens.FindAssociatedTokenAddress(tokenProgram, mint1, user) require.NoError(t, err) require.False(t, checkIfATAExists(t, rpcClient, ataAddress)) - lookups := []chainwriter.ATALookup{ + lookups := []soltypes.ATALookup{ { Location: "Inner.Address", - WalletAddress: chainwriter.Lookup{AccountConstant: &chainwriter.AccountConstant{ + WalletAddress: soltypes.Lookup{AccountConstant: &soltypes.AccountConstant{ Address: user.String(), }}, - MintAddress: chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{ + MintAddress: soltypes.Lookup{AccountLookup: &soltypes.AccountLookup{ Location: "Inner.Address", }}, }, @@ -981,13 +982,13 @@ func TestCreateATAs(t *testing.T) { ataAddress, _, err := tokens.FindAssociatedTokenAddress(tokenProgram, mint1, user) require.NoError(t, err) require.False(t, checkIfATAExists(t, rpcClient, ataAddress)) - lookups := []chainwriter.ATALookup{ + lookups := []soltypes.ATALookup{ { Location: "Inner.Address", - WalletAddress: chainwriter.Lookup{AccountConstant: &chainwriter.AccountConstant{ + WalletAddress: soltypes.Lookup{AccountConstant: &soltypes.AccountConstant{ Address: user.String(), }}, - MintAddress: chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{ + MintAddress: soltypes.Lookup{AccountLookup: &soltypes.AccountLookup{ Location: "Inner.Address", }}, }, @@ -1023,13 +1024,13 @@ func TestCreateATAs(t *testing.T) { ataAddresses = append(ataAddresses, ataAddress) } - lookups := []chainwriter.ATALookup{ + lookups := []soltypes.ATALookup{ { Location: "Inner.Address", - WalletAddress: chainwriter.Lookup{AccountConstant: &chainwriter.AccountConstant{ + WalletAddress: soltypes.Lookup{AccountConstant: &soltypes.AccountConstant{ Address: user.String(), }}, - MintAddress: chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{ + MintAddress: soltypes.Lookup{AccountLookup: &soltypes.AccountLookup{ Location: "Inner.Address", }}, }, @@ -1062,13 +1063,13 @@ func TestCreateATAs(t *testing.T) { t.Run("optional ATA creation does not return error if lookups fail", func(t *testing.T) { user := utils.GetRandomPubKey(t) - lookups := []chainwriter.ATALookup{ + lookups := []soltypes.ATALookup{ { Location: "Inner.Address", - WalletAddress: chainwriter.Lookup{AccountConstant: &chainwriter.AccountConstant{ + WalletAddress: soltypes.Lookup{AccountConstant: &soltypes.AccountConstant{ Address: user.String(), }}, - MintAddress: chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{ + MintAddress: soltypes.Lookup{AccountLookup: &soltypes.AccountLookup{ Location: "Inner.BadLocation", }}, Optional: true, diff --git a/pkg/solana/ccip/config/chain_writer.go b/pkg/solana/ccip/config/chain_writer.go index 841f78521..4892dfe43 100644 --- a/pkg/solana/ccip/config/chain_writer.go +++ b/pkg/solana/ccip/config/chain_writer.go @@ -8,6 +8,7 @@ import ( "github.com/gagliardetto/solana-go" "github.com/smartcontractkit/chainlink-common/pkg/codec" + soltypes "github.com/smartcontractkit/chainlink-common/pkg/types/solana" idl "github.com/smartcontractkit/chainlink-ccip/chains/solana" ccipconsts "github.com/smartcontractkit/chainlink-ccip/pkg/consts" @@ -55,8 +56,8 @@ func getCommitMethodConfig(fromAddress string, offrampProgramAddress string, pri } } -func buildCommitAccountsList(fromAddress, offrampProgramAddress string, priceOnly bool) []chainwriter.Lookup { - accounts := []chainwriter.Lookup{} +func buildCommitAccountsList(fromAddress, offrampProgramAddress string, priceOnly bool) []soltypes.Lookup { + var accounts []chainwriter.Lookup accounts = append(accounts, getOfframpAccountConfig(offrampProgramAddress), getReferenceAddressesConfig(offrampProgramAddress), @@ -69,7 +70,7 @@ func buildCommitAccountsList(fromAddress, offrampProgramAddress string, priceOnl PublicKey: getAddressConstant(offrampProgramAddress), Seeds: []chainwriter.Seed{ {Static: []byte("source_chain_state")}, - {Dynamic: chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{Location: merkleRootSourceChainSelector}}}, + {Dynamic: soltypes.Lookup{AccountLookup: &chainwriter.AccountLookup{Location: merkleRootSourceChainSelector}}}, }, IsSigner: false, IsWritable: true, @@ -81,8 +82,8 @@ func buildCommitAccountsList(fromAddress, offrampProgramAddress string, priceOnl PublicKey: getAddressConstant(offrampProgramAddress), Seeds: []chainwriter.Seed{ {Static: []byte("commit_report")}, - {Dynamic: chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{Location: merkleRootSourceChainSelector}}}, - {Dynamic: chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{Location: merkleRoot}}}, + {Dynamic: soltypes.Lookup{AccountLookup: &chainwriter.AccountLookup{Location: merkleRootSourceChainSelector}}}, + {Dynamic: soltypes.Lookup{AccountLookup: &chainwriter.AccountLookup{Location: merkleRoot}}}, }, IsSigner: false, IsWritable: true, @@ -95,7 +96,7 @@ func buildCommitAccountsList(fromAddress, offrampProgramAddress string, priceOnl getSystemProgramConstant(), getSysVarInstructionConstant(), getFeeBillingSignerConfig(offrampProgramAddress), - getFeeQuoterProgramAccount(offrampProgramAddress), + chainwriter.Lookup(getFeeQuoterProgramAccount(offrampProgramAddress)), getFeeQuoterAllowedPriceUpdater(offrampProgramAddress), getFeeQuoterConfigLookup(offrampProgramAddress), getRMNRemoteProgramAccount(offrampProgramAddress), @@ -105,7 +106,11 @@ func buildCommitAccountsList(fromAddress, offrampProgramAddress string, priceOnl getBillingTokenConfig(offrampProgramAddress), getChainConfigGasPriceConfig(offrampProgramAddress), ) - return accounts + ret := make([]soltypes.Lookup, len(accounts)) + for _, a := range accounts { + ret = append(ret, soltypes.Lookup(a)) + } + return ret } func getExecuteMethodConfig(fromAddress string, _ string) chainwriter.MethodConfig { @@ -126,8 +131,8 @@ func getExecuteMethodConfig(fromAddress string, _ string) chainwriter.MethodConf ATAs: []chainwriter.ATALookup{ { Location: destTokenAddress, - WalletAddress: chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{Location: tokenReceiverAddress}}, - MintAddress: chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{Location: destTokenAddress}}, + WalletAddress: soltypes.Lookup{AccountLookup: &chainwriter.AccountLookup{Location: tokenReceiverAddress}}, + MintAddress: soltypes.Lookup{AccountLookup: &chainwriter.AccountLookup{Location: destTokenAddress}}, Optional: true, // ATA lookup is optional if DestTokenAddress is not present in report }, }, @@ -179,7 +184,7 @@ func getOfframpAccountConfig(offrampProgramAddress string) chainwriter.Lookup { return chainwriter.Lookup{ PDALookups: &chainwriter.PDALookups{ Name: "OfframpAccountConfig", - PublicKey: chainwriter.Lookup{ + PublicKey: soltypes.Lookup{ AccountConstant: &chainwriter.AccountConstant{ Address: offrampProgramAddress, }, @@ -193,8 +198,8 @@ func getOfframpAccountConfig(offrampProgramAddress string) chainwriter.Lookup { } } -func getAddressConstant(address string) chainwriter.Lookup { - return chainwriter.Lookup{ +func getAddressConstant(address string) soltypes.Lookup { + return soltypes.Lookup{ AccountConstant: &chainwriter.AccountConstant{ Address: address, IsSigner: false, @@ -203,8 +208,8 @@ func getAddressConstant(address string) chainwriter.Lookup { } } -func getFeeQuoterProgramAccount(offrampProgramAddress string) chainwriter.Lookup { - return chainwriter.Lookup{ +func getFeeQuoterProgramAccount(offrampProgramAddress string) soltypes.Lookup { + return soltypes.Lookup{ PDALookups: &chainwriter.PDALookups{ Name: ccipconsts.ContractNameFeeQuoter, PublicKey: getAddressConstant(offrampProgramAddress), @@ -259,7 +264,7 @@ func getFeeQuoterAllowedPriceUpdater(offrampProgramAddress string) chainwriter.L PublicKey: getFeeQuoterProgramAccount(offrampProgramAddress), Seeds: []chainwriter.Seed{ {Static: []byte("allowed_price_updater")}, - {Dynamic: getFeeBillingSignerConfig(offrampProgramAddress)}, + {Dynamic: soltypes.Lookup(getFeeBillingSignerConfig(offrampProgramAddress))}, }, IsSigner: false, IsWritable: false, @@ -306,7 +311,7 @@ func getRMNRemoteCursesLookup(offrampProgramAddress string) chainwriter.Lookup { return chainwriter.Lookup{ PDALookups: &chainwriter.PDALookups{ Name: "RMNRemoteCurses", - PublicKey: getRMNRemoteProgramAccount(offrampProgramAddress), + PublicKey: soltypes.Lookup(getRMNRemoteProgramAccount(offrampProgramAddress)), Seeds: []chainwriter.Seed{ {Static: []byte("curses")}, }, @@ -320,7 +325,7 @@ func getRMNRemoteConfigLookup(offrampProgramAddress string) chainwriter.Lookup { return chainwriter.Lookup{ PDALookups: &chainwriter.PDALookups{ Name: "RMNRemoteConfig", - PublicKey: getRMNRemoteProgramAccount(offrampProgramAddress), + PublicKey: soltypes.Lookup(getRMNRemoteProgramAccount(offrampProgramAddress)), Seeds: []chainwriter.Seed{ {Static: []byte("config")}, }, @@ -352,7 +357,7 @@ func getBillingTokenConfig(offrampProgramAddress string) chainwriter.Lookup { PublicKey: getFeeQuoterProgramAccount(offrampProgramAddress), Seeds: []chainwriter.Seed{ {Static: []byte("fee_billing_token_config")}, - {Dynamic: chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{Location: "Info.TokenPriceUpdates.TokenID"}}}, + {Dynamic: soltypes.Lookup{AccountLookup: &chainwriter.AccountLookup{Location: "Info.TokenPriceUpdates.TokenID"}}}, }, IsSigner: false, IsWritable: true, @@ -368,7 +373,7 @@ func getChainConfigGasPriceConfig(offrampProgramAddress string) chainwriter.Look PublicKey: getFeeQuoterProgramAccount(offrampProgramAddress), Seeds: []chainwriter.Seed{ {Static: []byte("dest_chain")}, - {Dynamic: chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{Location: "Info.GasPriceUpdates.ChainSel"}}}, + {Dynamic: soltypes.Lookup{AccountLookup: &chainwriter.AccountLookup{Location: "Info.GasPriceUpdates.ChainSel"}}}, }, IsSigner: false, IsWritable: true, @@ -382,7 +387,7 @@ func getChainConfigGasPriceConfig(offrampProgramAddress string) chainwriter.Look func getCommonAddressLookupTableConfig(offrampProgramAddress string) chainwriter.DerivedLookupTable { return chainwriter.DerivedLookupTable{ Name: "CommonAddressLookupTable", - Accounts: chainwriter.Lookup{ + Accounts: soltypes.Lookup{ PDALookups: &chainwriter.PDALookups{ Name: "OfframpLookupTable", PublicKey: getAddressConstant(offrampProgramAddress), diff --git a/pkg/solana/chainreader/chain_reader.go b/pkg/solana/chainreader/chain_reader.go index 9a040e936..7c0c7741e 100644 --- a/pkg/solana/chainreader/chain_reader.go +++ b/pkg/solana/chainreader/chain_reader.go @@ -16,6 +16,7 @@ import ( "github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings/v0_1_1/fee_quoter" ccipconsts "github.com/smartcontractkit/chainlink-ccip/pkg/consts" + soltypes "github.com/smartcontractkit/chainlink-common/pkg/types/solana" commoncodec "github.com/smartcontractkit/chainlink-common/pkg/codec" "github.com/smartcontractkit/chainlink-common/pkg/logger" @@ -586,7 +587,7 @@ func (s *ContractReaderService) addAddressResponseHardCoderModifier(namespace st } func (s *ContractReaderService) addEventRead( - common *config.PollingFilter, + common *soltypes.PollingFilter, namespace, genericName string, idl codec.IDL, readDefinition config.ReadDefinition, @@ -928,10 +929,14 @@ func (s *ContractReaderService) getPDAsForGetTokenPrices(params any, values read return pdaAddresses, nil } -func setPollingFilterOverrides(common *config.PollingFilter, overrides ...*config.PollingFilter) (config.PollingFilter, error) { - final := reflect.New(reflect.TypeOf(common).Elem()) - valOfF := final.Elem() - allOverrides := append([]*config.PollingFilter{common}, overrides...) +func setPollingFilterOverrides(common *soltypes.PollingFilter, overrides ...*soltypes.PollingFilter) (config.PollingFilter, error) { + allOverrides := make([]*config.PollingFilter, len(overrides)+1) + allOverrides[0] = (*config.PollingFilter)(common) + for i, o := range overrides { + allOverrides[i+1] = (*config.PollingFilter)(o) + } + + valOfF := reflect.New(reflect.TypeOf(allOverrides[0]).Elem()).Elem() for _, override := range allOverrides { if override == nil { @@ -956,9 +961,9 @@ func setPollingFilterOverrides(common *config.PollingFilter, overrides ...*confi } } - filter, ok := final.Elem().Interface().(config.PollingFilter) + filter, ok := valOfF.Interface().(config.PollingFilter) if !ok { - return config.PollingFilter{}, fmt.Errorf("encountered unexpected type: %T, expected: %T", final.Elem().Interface(), config.PollingFilter{}) + return config.PollingFilter{}, fmt.Errorf("encountered unexpected type: %T, expected: %T", valOfF.Interface(), config.PollingFilter{}) } return filter, nil diff --git a/pkg/solana/chainreader/chain_reader_test.go b/pkg/solana/chainreader/chain_reader_test.go index 5c13b1ae6..b64de7c90 100644 --- a/pkg/solana/chainreader/chain_reader_test.go +++ b/pkg/solana/chainreader/chain_reader_test.go @@ -22,6 +22,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/sqlutil/sqltest" + soltypes "github.com/smartcontractkit/chainlink-common/pkg/types/solana" "github.com/smartcontractkit/libocr/commontypes" @@ -122,7 +123,7 @@ func TestSolanaChainReaderService_Start(t *testing.T) { OffChainPath: "A.B", OnChainPath: "A.B", }, - PollingFilter: &config.PollingFilter{}, + PollingFilter: &soltypes.PollingFilter{}, }, } diff --git a/pkg/solana/chainwriter/ata_creation.go b/pkg/solana/chainwriter/ata_creation.go index 0f9221ea9..2eac2a511 100644 --- a/pkg/solana/chainwriter/ata_creation.go +++ b/pkg/solana/chainwriter/ata_creation.go @@ -11,6 +11,7 @@ import ( "github.com/google/uuid" "github.com/smartcontractkit/chainlink-ccip/chains/solana/utils/tokens" + soltypes "github.com/smartcontractkit/chainlink-common/pkg/types/solana" "github.com/smartcontractkit/chainlink-common/pkg/logger" @@ -39,7 +40,7 @@ func CreateATAs(ctx context.Context, args any, lookups []ATALookup, derivedTable return nil, fmt.Errorf("error getting values at location: %w", err) } } - walletAddresses, err := GetAddresses(ctx, args, []Lookup{lookup.WalletAddress}, derivedTableMap, client) + walletAddresses, err := GetAddresses(ctx, args, []soltypes.Lookup{lookup.WalletAddress}, derivedTableMap, client) if lookup.Optional && isIgnorableError(err) { continue } else if err != nil { @@ -50,7 +51,7 @@ func CreateATAs(ctx context.Context, args any, lookups []ATALookup, derivedTable } wallet := walletAddresses[0].PublicKey - mints, err := GetAddresses(ctx, args, []Lookup{lookup.MintAddress}, derivedTableMap, client) + mints, err := GetAddresses(ctx, args, []soltypes.Lookup{lookup.MintAddress}, derivedTableMap, client) if lookup.Optional && isIgnorableError(err) { continue } else if err != nil { diff --git a/pkg/solana/chainwriter/chain_writer.go b/pkg/solana/chainwriter/chain_writer.go index 399c3d2ed..d33b038ce 100644 --- a/pkg/solana/chainwriter/chain_writer.go +++ b/pkg/solana/chainwriter/chain_writer.go @@ -11,10 +11,10 @@ import ( addresslookuptable "github.com/gagliardetto/solana-go/programs/address-lookup-table" "github.com/gagliardetto/solana-go/rpc" - commoncodec "github.com/smartcontractkit/chainlink-common/pkg/codec" "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/services" "github.com/smartcontractkit/chainlink-common/pkg/types" + soltypes "github.com/smartcontractkit/chainlink-common/pkg/types/solana" "github.com/smartcontractkit/chainlink-solana/pkg/solana/client" "github.com/smartcontractkit/chainlink-solana/pkg/solana/codec" @@ -47,31 +47,15 @@ var ( _ types.ContractWriter = &SolanaChainWriterService{} ) +// Deprecated // nolint // ignoring naming suggestion -type ChainWriterConfig struct { - Programs map[string]ProgramConfig `json:"programs"` -} +type ChainWriterConfig = soltypes.ContractWriterConfig -type ProgramConfig struct { - Methods map[string]MethodConfig `json:"methods"` - IDL string `json:"idl"` -} +// Deprecated +type ProgramConfig = soltypes.ProgramConfig -type MethodConfig struct { - FromAddress string `json:"fromAddress"` - InputModifications commoncodec.ModifiersConfig `json:"inputModifications,omitempty"` - ChainSpecificName string `json:"chainSpecificName"` - LookupTables LookupTables `json:"lookupTables,omitempty"` - Accounts []Lookup `json:"accounts"` - ATAs []ATALookup `json:"atas,omitempty"` - // Location in the args where the debug ID is stored - DebugIDLocation string `json:"debugIDLocation,omitempty"` - ArgsTransform string `json:"argsTransform,omitempty"` - // Overhead added to calculated compute units in the args transform - ComputeUnitLimitOverhead uint32 `json:"ComputeUnitLimitOverhead,omitempty"` - // Configs for buffering payloads to support larger transaction sizes for this method - BufferPayloadMethod string `json:"bufferPayloadMethod,omitempty"` -} +// Deprecated +type MethodConfig = soltypes.MethodConfig func NewSolanaChainWriterService(logger logger.Logger, client client.MultiClient, txm txm.TxManager, ge fees.Estimator, config ChainWriterConfig) (*SolanaChainWriterService, error) { w := SolanaChainWriterService{ @@ -157,10 +141,10 @@ for Solana transactions. It handles constant addresses, dynamic lookups, program ### Error Handling: - Errors are wrapped with the `debugID` for easier tracing. */ -func GetAddresses(ctx context.Context, args any, accounts []Lookup, derivedTableMap map[string]map[string][]*solana.AccountMeta, client client.MultiClient) ([]*solana.AccountMeta, error) { +func GetAddresses(ctx context.Context, args any, accounts []soltypes.Lookup, derivedTableMap map[string]map[string][]*solana.AccountMeta, client client.MultiClient) ([]*solana.AccountMeta, error) { var addresses []*solana.AccountMeta for _, accountConfig := range accounts { - meta, err := accountConfig.Resolve(ctx, args, derivedTableMap, client) + meta, err := Lookup(accountConfig).Resolve(ctx, args, derivedTableMap, client) if accountConfig.Optional && err != nil && isIgnorableError(err) { // skip optional accounts if they are not found continue @@ -465,7 +449,7 @@ func (s *SolanaChainWriterService) ResolveLookupTables(ctx context.Context, args func (s *SolanaChainWriterService) loadTable(ctx context.Context, args any, rlt DerivedLookupTable) (map[string]map[string][]*solana.AccountMeta, error) { // Resolve all addresses specified by the identifier - lookupTableAddresses, err := GetAddresses(ctx, args, []Lookup{rlt.Accounts}, nil, s.client) + lookupTableAddresses, err := GetAddresses(ctx, args, []soltypes.Lookup{rlt.Accounts}, nil, s.client) if err != nil { return nil, fmt.Errorf("error resolving addresses for lookup table: %w", err) } diff --git a/pkg/solana/chainwriter/chain_writer_test.go b/pkg/solana/chainwriter/chain_writer_test.go index 4bfbb28c6..e3509c372 100644 --- a/pkg/solana/chainwriter/chain_writer_test.go +++ b/pkg/solana/chainwriter/chain_writer_test.go @@ -20,6 +20,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/codec" "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" + soltypes "github.com/smartcontractkit/chainlink-common/pkg/types/solana" ccipsolana "github.com/smartcontractkit/chainlink-ccip/chains/solana" "github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings/v0_1_1/ccip_offramp" @@ -65,7 +66,7 @@ func TestChainWriter_GetAddresses(t *testing.T) { txm := txmMocks.NewTxManager(t) // initialize chain writer - cw, err := chainwriter.NewSolanaChainWriterService(testutils.NewNullLogger(), mc, txm, ge, chainwriter.ChainWriterConfig{}) + cw, err := chainwriter.NewSolanaChainWriterService(testutils.NewNullLogger(), mc, txm, ge, soltypes.ContractWriterConfig{}) require.NoError(t, err) // expected account meta for constant account @@ -105,20 +106,20 @@ func TestChainWriter_GetAddresses(t *testing.T) { IsWritable: true, } - lookupTableConfig := chainwriter.LookupTables{ - DerivedLookupTables: []chainwriter.DerivedLookupTable{ + lookupTableConfig := soltypes.LookupTables{ + DerivedLookupTables: []soltypes.DerivedLookupTable{ { Name: "DerivedTable", - Accounts: chainwriter.Lookup{PDALookups: &chainwriter.PDALookups{ + Accounts: soltypes.Lookup{PDALookups: &soltypes.PDALookups{ Name: "DataAccountPDA", - PublicKey: chainwriter.Lookup{AccountConstant: &chainwriter.AccountConstant{Name: "WriteTest", Address: programID.String()}}, - Seeds: []chainwriter.Seed{ + PublicKey: soltypes.Lookup{AccountConstant: &soltypes.AccountConstant{Name: "WriteTest", Address: programID.String()}}, + Seeds: []soltypes.Seed{ // extract seed2 for PDA lookup - {Dynamic: chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{Name: "Seed2", Location: "Seed2"}}}, + {Dynamic: soltypes.Lookup{AccountLookup: &soltypes.AccountLookup{Name: "Seed2", Location: "Seed2"}}}, }, IsSigner: derivedTablePdaLookupMeta.IsSigner, IsWritable: derivedTablePdaLookupMeta.IsWritable, - InternalField: chainwriter.InternalField{ + InternalField: soltypes.InternalField{ TypeName: "LookupTableDataAccount", Location: "LookupTable", IDL: testContractIDL, @@ -141,32 +142,32 @@ func TestChainWriter_GetAddresses(t *testing.T) { Seed2: seed2, } - accountLookupConfig := []chainwriter.Lookup{ - {AccountConstant: &chainwriter.AccountConstant{ + accountLookupConfig := []soltypes.Lookup{ + {AccountConstant: &soltypes.AccountConstant{ Name: "Constant", Address: constantAccountMeta.PublicKey.String(), IsSigner: constantAccountMeta.IsSigner, IsWritable: constantAccountMeta.IsWritable, }}, - {AccountLookup: &chainwriter.AccountLookup{ + {AccountLookup: &soltypes.AccountLookup{ Name: "LookupTable", Location: "LookupTable", - IsSigner: chainwriter.MetaBool{Value: accountLookupMeta.IsSigner}, - IsWritable: chainwriter.MetaBool{Value: accountLookupMeta.IsWritable}, + IsSigner: soltypes.MetaBool{Value: accountLookupMeta.IsSigner}, + IsWritable: soltypes.MetaBool{Value: accountLookupMeta.IsWritable}, }}, - {PDALookups: &chainwriter.PDALookups{ + {PDALookups: &soltypes.PDALookups{ Name: "DataAccountPDA", - PublicKey: chainwriter.Lookup{AccountConstant: &chainwriter.AccountConstant{Name: "WriteTest", Address: solana.SystemProgramID.String()}}, - Seeds: []chainwriter.Seed{ + PublicKey: soltypes.Lookup{AccountConstant: &soltypes.AccountConstant{Name: "WriteTest", Address: solana.SystemProgramID.String()}}, + Seeds: []soltypes.Seed{ // extract seed1 for PDA lookup - {Dynamic: chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{Name: "Seed1", Location: "Seed1"}}}, + {Dynamic: soltypes.Lookup{AccountLookup: &soltypes.AccountLookup{Name: "Seed1", Location: "Seed1"}}}, }, IsSigner: pdaLookupMeta.IsSigner, IsWritable: pdaLookupMeta.IsWritable, // Just get the address of the account, nothing internal. - InternalField: chainwriter.InternalField{}, + InternalField: soltypes.InternalField{}, }}, - {AccountsFromLookupTable: &chainwriter.AccountsFromLookupTable{ + {AccountsFromLookupTable: &soltypes.AccountsFromLookupTable{ LookupTableName: "DerivedTable", IncludeIndexes: []int{0}, }}, @@ -209,8 +210,8 @@ func TestChainWriter_GetAddresses(t *testing.T) { Seed2: seed2, } - accountLookupConfig := []chainwriter.Lookup{ - {AccountsFromLookupTable: &chainwriter.AccountsFromLookupTable{ + accountLookupConfig := []soltypes.Lookup{ + {AccountsFromLookupTable: &soltypes.AccountsFromLookupTable{ LookupTableName: "DerivedTable", IncludeIndexes: []int{0, 2}, }}, @@ -234,8 +235,8 @@ func TestChainWriter_GetAddresses(t *testing.T) { Seed2: seed2, } - accountLookupConfig := []chainwriter.Lookup{ - {AccountsFromLookupTable: &chainwriter.AccountsFromLookupTable{ + accountLookupConfig := []soltypes.Lookup{ + {AccountsFromLookupTable: &soltypes.AccountsFromLookupTable{ LookupTableName: "DerivedTable", }}, } @@ -258,13 +259,13 @@ func TestChainWriter_GetAddresses(t *testing.T) { const invalidLocation = "Invalid.Path" t.Run("AccountLookup error is skipped when Lookup is optional", func(t *testing.T) { - accountLookupConfig := []chainwriter.Lookup{ + accountLookupConfig := []soltypes.Lookup{ { - AccountLookup: &chainwriter.AccountLookup{ + AccountLookup: &soltypes.AccountLookup{ Name: "OptionalAccountLookup", Location: invalidLocation, - IsSigner: chainwriter.MetaBool{Value: false}, - IsWritable: chainwriter.MetaBool{Value: false}, + IsSigner: soltypes.MetaBool{Value: false}, + IsWritable: soltypes.MetaBool{Value: false}, }, Optional: true, }, @@ -278,12 +279,12 @@ func TestChainWriter_GetAddresses(t *testing.T) { }) t.Run("AccountLookup error is returned when Lookup is required", func(t *testing.T) { - accountLookupConfig := []chainwriter.Lookup{ - {AccountLookup: &chainwriter.AccountLookup{ + accountLookupConfig := []soltypes.Lookup{ + {AccountLookup: &soltypes.AccountLookup{ Name: "NonOptionalAccountLookup", Location: invalidLocation, - IsSigner: chainwriter.MetaBool{Value: false}, - IsWritable: chainwriter.MetaBool{Value: false}, + IsSigner: soltypes.MetaBool{Value: false}, + IsWritable: soltypes.MetaBool{Value: false}, }}, } @@ -294,13 +295,13 @@ func TestChainWriter_GetAddresses(t *testing.T) { }) t.Run("PDALookups error is skipped when Lookup is optional", func(t *testing.T) { - accountLookupConfig := []chainwriter.Lookup{ + accountLookupConfig := []soltypes.Lookup{ { - PDALookups: &chainwriter.PDALookups{ + PDALookups: &soltypes.PDALookups{ Name: "OptionalPDA", - PublicKey: chainwriter.Lookup{AccountConstant: &chainwriter.AccountConstant{Name: "ProgramID", Address: solana.SystemProgramID.String()}}, - Seeds: []chainwriter.Seed{ - {Dynamic: chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{Location: invalidLocation}}}, + PublicKey: soltypes.Lookup{AccountConstant: &soltypes.AccountConstant{Name: "ProgramID", Address: solana.SystemProgramID.String()}}, + Seeds: []soltypes.Seed{ + {Dynamic: soltypes.Lookup{AccountLookup: &soltypes.AccountLookup{Location: invalidLocation}}}, }, }, Optional: true, @@ -314,12 +315,12 @@ func TestChainWriter_GetAddresses(t *testing.T) { }) t.Run("PDALookups error is returned when Lookup is required", func(t *testing.T) { - accountLookupConfig := []chainwriter.Lookup{ - {PDALookups: &chainwriter.PDALookups{ + accountLookupConfig := []soltypes.Lookup{ + {PDALookups: &soltypes.PDALookups{ Name: "NonOptionalPDA", - PublicKey: chainwriter.Lookup{AccountConstant: &chainwriter.AccountConstant{Name: "ProgramID", Address: solana.SystemProgramID.String()}}, - Seeds: []chainwriter.Seed{ - {Dynamic: chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{Location: invalidLocation}}}, + PublicKey: soltypes.Lookup{AccountConstant: &soltypes.AccountConstant{Name: "ProgramID", Address: solana.SystemProgramID.String()}}, + Seeds: []soltypes.Seed{ + {Dynamic: soltypes.Lookup{AccountLookup: &soltypes.AccountLookup{Location: invalidLocation}}}, }, }}, } @@ -331,12 +332,12 @@ func TestChainWriter_GetAddresses(t *testing.T) { }) t.Run("DerivedLookupTable error is skipped when Lookup is optional", func(t *testing.T) { - lookupTables := chainwriter.LookupTables{ - DerivedLookupTables: []chainwriter.DerivedLookupTable{ + lookupTables := soltypes.LookupTables{ + DerivedLookupTables: []soltypes.DerivedLookupTable{ { Name: "OptionalDerivedTable", Optional: true, - Accounts: chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{ + Accounts: soltypes.Lookup{AccountLookup: &soltypes.AccountLookup{ Location: invalidLocation, }}, }, @@ -351,11 +352,11 @@ func TestChainWriter_GetAddresses(t *testing.T) { }) t.Run("DerivedLookupTable error is returned when Lookup is required", func(t *testing.T) { - lookupTables := chainwriter.LookupTables{ - DerivedLookupTables: []chainwriter.DerivedLookupTable{ + lookupTables := soltypes.LookupTables{ + DerivedLookupTables: []soltypes.DerivedLookupTable{ { Name: "NonOptionalDerivedTable", - Accounts: chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{ + Accounts: soltypes.Lookup{AccountLookup: &soltypes.AccountLookup{ Location: invalidLocation, }}, Optional: false, @@ -369,9 +370,9 @@ func TestChainWriter_GetAddresses(t *testing.T) { }) t.Run("AccountsFromLookupTable error is skipped when Lookup is optional", func(t *testing.T) { - accountLookupConfig := []chainwriter.Lookup{ + accountLookupConfig := []soltypes.Lookup{ { - AccountsFromLookupTable: &chainwriter.AccountsFromLookupTable{ + AccountsFromLookupTable: &soltypes.AccountsFromLookupTable{ LookupTableName: "NonExistent", }, Optional: true, @@ -386,8 +387,8 @@ func TestChainWriter_GetAddresses(t *testing.T) { }) t.Run("AccountsFromLookupTable error is returned when Lookup is required", func(t *testing.T) { - accountLookupConfig := []chainwriter.Lookup{ - {AccountsFromLookupTable: &chainwriter.AccountsFromLookupTable{ + accountLookupConfig := []soltypes.Lookup{ + {AccountsFromLookupTable: &soltypes.AccountsFromLookupTable{ LookupTableName: "NonExistent", }}, } @@ -413,7 +414,7 @@ func TestChainWriter_FilterLookupTableAddresses(t *testing.T) { txm := txmMocks.NewTxManager(t) // initialize chain writer - cw, err := chainwriter.NewSolanaChainWriterService(testutils.NewNullLogger(), mc, txm, ge, chainwriter.ChainWriterConfig{}) + cw, err := chainwriter.NewSolanaChainWriterService(testutils.NewNullLogger(), mc, txm, ge, soltypes.ContractWriterConfig{}) require.NoError(t, err) programID := GetRandomPubKey(t) @@ -441,20 +442,20 @@ func TestChainWriter_FilterLookupTableAddresses(t *testing.T) { staticLookupTablePubkey2 := GetRandomPubKey(t) mockFetchLookupTableAddresses(t, rw, staticLookupTablePubkey2, CreateTestPubKeys(t, 2)) - lookupTableConfig := chainwriter.LookupTables{ - DerivedLookupTables: []chainwriter.DerivedLookupTable{ + lookupTableConfig := soltypes.LookupTables{ + DerivedLookupTables: []soltypes.DerivedLookupTable{ { Name: "DerivedTable", - Accounts: chainwriter.Lookup{PDALookups: &chainwriter.PDALookups{ + Accounts: soltypes.Lookup{PDALookups: &soltypes.PDALookups{ Name: "DataAccountPDA", - PublicKey: chainwriter.Lookup{AccountConstant: &chainwriter.AccountConstant{Name: "WriteTest", Address: programID.String()}}, - Seeds: []chainwriter.Seed{ + PublicKey: soltypes.Lookup{AccountConstant: &soltypes.AccountConstant{Name: "WriteTest", Address: programID.String()}}, + Seeds: []soltypes.Seed{ // extract seed1 for PDA lookup - {Dynamic: chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{Name: "Seed1", Location: "Seed1"}}}, + {Dynamic: soltypes.Lookup{AccountLookup: &soltypes.AccountLookup{Name: "Seed1", Location: "Seed1"}}}, }, IsSigner: true, IsWritable: true, - InternalField: chainwriter.InternalField{ + InternalField: soltypes.InternalField{ TypeName: "LookupTableDataAccount", Location: "LookupTable", IDL: testContractIDL, @@ -463,16 +464,16 @@ func TestChainWriter_FilterLookupTableAddresses(t *testing.T) { }, { Name: "MiscDerivedTable", - Accounts: chainwriter.Lookup{PDALookups: &chainwriter.PDALookups{ + Accounts: soltypes.Lookup{PDALookups: &soltypes.PDALookups{ Name: "MiscPDA", - PublicKey: chainwriter.Lookup{AccountConstant: &chainwriter.AccountConstant{Name: "UnusedAccount", Address: unusedProgramID.String()}}, - Seeds: []chainwriter.Seed{ + PublicKey: soltypes.Lookup{AccountConstant: &soltypes.AccountConstant{Name: "UnusedAccount", Address: unusedProgramID.String()}}, + Seeds: []soltypes.Seed{ // extract seed2 for PDA lookup - {Dynamic: chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{Name: "Seed2", Location: "Seed2"}}}, + {Dynamic: soltypes.Lookup{AccountLookup: &soltypes.AccountLookup{Name: "Seed2", Location: "Seed2"}}}, }, IsSigner: true, IsWritable: true, - InternalField: chainwriter.InternalField{ + InternalField: soltypes.InternalField{ TypeName: "LookupTableDataAccount", Location: "LookupTable", IDL: testContractIDL, @@ -480,7 +481,7 @@ func TestChainWriter_FilterLookupTableAddresses(t *testing.T) { }}, }, }, - StaticLookupTables: []solana.PublicKey{staticLookupTablePubkey1, staticLookupTablePubkey2}, + StaticLookupTables: [][32]byte{staticLookupTablePubkey1, staticLookupTablePubkey2}, } args := Arguments{ @@ -489,8 +490,8 @@ func TestChainWriter_FilterLookupTableAddresses(t *testing.T) { } t.Run("returns filtered map with only relevant lookup tables required by account lookup config", func(t *testing.T) { - accountLookupConfig := []chainwriter.Lookup{ - {AccountsFromLookupTable: &chainwriter.AccountsFromLookupTable{ + accountLookupConfig := []soltypes.Lookup{ + {AccountsFromLookupTable: &soltypes.AccountsFromLookupTable{ LookupTableName: "DerivedTable", IncludeIndexes: []int{0}, }}, @@ -516,8 +517,8 @@ func TestChainWriter_FilterLookupTableAddresses(t *testing.T) { }) t.Run("returns filtered map and ignores nil account meta and nil entry in lookup table", func(t *testing.T) { - accountLookupConfig := []chainwriter.Lookup{ - {AccountsFromLookupTable: &chainwriter.AccountsFromLookupTable{ + accountLookupConfig := []soltypes.Lookup{ + {AccountsFromLookupTable: &soltypes.AccountsFromLookupTable{ LookupTableName: "DerivedTable", IncludeIndexes: []int{0}, }}, @@ -548,7 +549,7 @@ func TestChainWriter_FilterLookupTableAddresses(t *testing.T) { }) t.Run("returns empty map if empty account lookup config provided", func(t *testing.T) { - accountLookupConfig := []chainwriter.Lookup{} + accountLookupConfig := []soltypes.Lookup{} // Fetch derived table map derivedTableMap, staticTableMap, err := cw.ResolveLookupTables(ctx, args, lookupTableConfig) @@ -564,8 +565,8 @@ func TestChainWriter_FilterLookupTableAddresses(t *testing.T) { }) t.Run("returns empty map if only constant account lookup required", func(t *testing.T) { - accountLookupConfig := []chainwriter.Lookup{ - {AccountConstant: &chainwriter.AccountConstant{ + accountLookupConfig := []soltypes.Lookup{ + {AccountConstant: &soltypes.AccountConstant{ Name: "Constant", Address: GetRandomPubKey(t).String(), IsSigner: false, @@ -628,27 +629,27 @@ func TestChainWriter_SubmitTransaction(t *testing.T) { staticLookupKeys := CreateTestPubKeys(t, 2) mockFetchLookupTableAddresses(t, rw, staticLookupTablePubkey, staticLookupKeys) - cwConfig := chainwriter.ChainWriterConfig{ - Programs: map[string]chainwriter.ProgramConfig{ + cwConfig := soltypes.ContractWriterConfig{ + Programs: map[string]soltypes.ProgramConfig{ "contract_reader_interface": { - Methods: map[string]chainwriter.MethodConfig{ + Methods: map[string]soltypes.MethodConfig{ "initializeLookupTable": { FromAddress: admin.String(), ChainSpecificName: "initializeLookupTable", - LookupTables: chainwriter.LookupTables{ - DerivedLookupTables: []chainwriter.DerivedLookupTable{ + LookupTables: soltypes.LookupTables{ + DerivedLookupTables: []soltypes.DerivedLookupTable{ { Name: "DerivedTable", - Accounts: chainwriter.Lookup{PDALookups: &chainwriter.PDALookups{ + Accounts: soltypes.Lookup{PDALookups: &soltypes.PDALookups{ Name: "DataAccountPDA", - PublicKey: chainwriter.Lookup{AccountConstant: &chainwriter.AccountConstant{Name: "WriteTest", Address: programID.String()}}, - Seeds: []chainwriter.Seed{ + PublicKey: soltypes.Lookup{AccountConstant: &soltypes.AccountConstant{Name: "WriteTest", Address: programID.String()}}, + Seeds: []soltypes.Seed{ // extract seed2 for PDA lookup - {Dynamic: chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{Name: "Seed2", Location: "Seed2"}}}, + {Dynamic: soltypes.Lookup{AccountLookup: &soltypes.AccountLookup{Name: "Seed2", Location: "Seed2"}}}, }, IsSigner: false, IsWritable: false, - InternalField: chainwriter.InternalField{ + InternalField: soltypes.InternalField{ TypeName: "LookupTableDataAccount", Location: "LookupTable", IDL: testContractIDL, @@ -656,44 +657,44 @@ func TestChainWriter_SubmitTransaction(t *testing.T) { }}, }, }, - StaticLookupTables: []solana.PublicKey{staticLookupTablePubkey}, + StaticLookupTables: [][32]byte{staticLookupTablePubkey}, }, - Accounts: []chainwriter.Lookup{ - {AccountConstant: &chainwriter.AccountConstant{ + Accounts: []soltypes.Lookup{ + {AccountConstant: &soltypes.AccountConstant{ Name: "feepayer", Address: admin.String(), IsSigner: false, IsWritable: false, }}, - {AccountConstant: &chainwriter.AccountConstant{ + {AccountConstant: &soltypes.AccountConstant{ Name: "Constant", Address: account1.String(), IsSigner: false, IsWritable: false, }}, - {AccountLookup: &chainwriter.AccountLookup{ + {AccountLookup: &soltypes.AccountLookup{ Name: "LookupTable", Location: "LookupTable", - IsSigner: chainwriter.MetaBool{Value: false}, - IsWritable: chainwriter.MetaBool{Value: false}, + IsSigner: soltypes.MetaBool{Value: false}, + IsWritable: soltypes.MetaBool{Value: false}, }}, - {PDALookups: &chainwriter.PDALookups{ + {PDALookups: &soltypes.PDALookups{ Name: "DataAccountPDA", - PublicKey: chainwriter.Lookup{AccountConstant: &chainwriter.AccountConstant{Name: "WriteTest", Address: solana.SystemProgramID.String()}}, - Seeds: []chainwriter.Seed{ + PublicKey: soltypes.Lookup{AccountConstant: &soltypes.AccountConstant{Name: "WriteTest", Address: solana.SystemProgramID.String()}}, + Seeds: []soltypes.Seed{ // extract seed1 for PDA lookup - {Dynamic: chainwriter.Lookup{AccountLookup: &chainwriter.AccountLookup{Name: "Seed1", Location: "Seed1"}}}, + {Dynamic: soltypes.Lookup{AccountLookup: &soltypes.AccountLookup{Name: "Seed1", Location: "Seed1"}}}, }, IsSigner: false, IsWritable: false, // Just get the address of the account, nothing internal. - InternalField: chainwriter.InternalField{}, + InternalField: soltypes.InternalField{}, }}, - {AccountsFromLookupTable: &chainwriter.AccountsFromLookupTable{ + {AccountsFromLookupTable: &soltypes.AccountsFromLookupTable{ LookupTableName: "DerivedTable", IncludeIndexes: []int{0}, }}, - {AccountConstant: &chainwriter.AccountConstant{ + {AccountConstant: &soltypes.AccountConstant{ Name: "systemprogram", Address: solana.SystemProgramID.String(), IsSigner: false, @@ -706,7 +707,7 @@ func TestChainWriter_SubmitTransaction(t *testing.T) { IDL: testContractIDL, }, "buffer_payload": { - Methods: map[string]chainwriter.MethodConfig{ + Methods: map[string]soltypes.MethodConfig{ "execute": { FromAddress: admin.String(), ChainSpecificName: "execute", @@ -714,14 +715,14 @@ func TestChainWriter_SubmitTransaction(t *testing.T) { InputModifications: codec.ModifiersConfig{ &codec.HardCodeModifierConfig{OnChainValues: map[string]any{"Fail": false}}, }, - Accounts: []chainwriter.Lookup{ - {AccountConstant: &chainwriter.AccountConstant{ + Accounts: []soltypes.Lookup{ + {AccountConstant: &soltypes.AccountConstant{ Name: "feepayer", Address: admin.String(), IsSigner: false, IsWritable: false, }}, - {AccountConstant: &chainwriter.AccountConstant{ + {AccountConstant: &soltypes.AccountConstant{ Name: "system", Address: solana.SystemProgramID.String(), IsSigner: false, @@ -740,10 +741,10 @@ func TestChainWriter_SubmitTransaction(t *testing.T) { require.NoError(t, err) t.Run("fails with invalid ABI", func(t *testing.T) { - invalidCWConfig := chainwriter.ChainWriterConfig{ - Programs: map[string]chainwriter.ProgramConfig{ + invalidCWConfig := soltypes.ContractWriterConfig{ + Programs: map[string]soltypes.ProgramConfig{ "invalid_program": { - Methods: map[string]chainwriter.MethodConfig{ + Methods: map[string]soltypes.MethodConfig{ "invalid": { ChainSpecificName: "invalid", }, @@ -815,17 +816,17 @@ func TestChainWriter_SubmitTransaction(t *testing.T) { t.Run("invalid buffer methods", func(t *testing.T) { recentBlockHash := solana.Hash{} - customConfig := chainwriter.ChainWriterConfig{ - Programs: map[string]chainwriter.ProgramConfig{ + customConfig := soltypes.ContractWriterConfig{ + Programs: map[string]soltypes.ProgramConfig{ "buffer_payload": { - Methods: map[string]chainwriter.MethodConfig{ + Methods: map[string]soltypes.MethodConfig{ "execute": { FromAddress: admin.String(), ChainSpecificName: "execute", InputModifications: codec.ModifiersConfig{ &codec.HardCodeModifierConfig{OnChainValues: map[string]any{"Fail": false}}, }, - Accounts: []chainwriter.Lookup{}, + Accounts: []soltypes.Lookup{}, }, }, IDL: testBufferContractIDL, @@ -932,10 +933,10 @@ func TestChainWriter_SubmitTransaction(t *testing.T) { rw.On("LatestBlockhash", mock.Anything).Return(&rpc.GetLatestBlockhashResult{Value: &rpc.LatestBlockhashResult{Blockhash: recentBlockHash, LastValidBlockHeight: uint64(100)}}, nil).Twice() txID := uuid.NewString() - customConfig := chainwriter.ChainWriterConfig{ - Programs: map[string]chainwriter.ProgramConfig{ + customConfig := soltypes.ContractWriterConfig{ + Programs: map[string]soltypes.ProgramConfig{ "buffer_payload": { - Methods: map[string]chainwriter.MethodConfig{ + Methods: map[string]soltypes.MethodConfig{ "execute": { FromAddress: admin.String(), ChainSpecificName: "execute", @@ -943,7 +944,7 @@ func TestChainWriter_SubmitTransaction(t *testing.T) { InputModifications: codec.ModifiersConfig{ &codec.HardCodeModifierConfig{OnChainValues: map[string]any{"Fail": false}}, }, - Accounts: []chainwriter.Lookup{}, + Accounts: []soltypes.Lookup{}, }, }, IDL: testBufferContractIDL, @@ -953,7 +954,7 @@ func TestChainWriter_SubmitTransaction(t *testing.T) { methodConfig := customConfig.Programs["buffer_payload"].Methods["execute"] for i := range 40 { - methodConfig.Accounts = append(methodConfig.Accounts, chainwriter.Lookup{AccountConstant: &chainwriter.AccountConstant{ + methodConfig.Accounts = append(methodConfig.Accounts, soltypes.Lookup{AccountConstant: &soltypes.AccountConstant{ Name: fmt.Sprintf("randomAccount%d", i), Address: GetRandomPubKey(t).String(), IsSigner: false, @@ -995,10 +996,10 @@ func TestChainWriter_CCIPOfframp(t *testing.T) { staticCUOverhead := uint32(150_000) // simplified CCIP Config - does not contain full account list - ccipCWConfig := chainwriter.ChainWriterConfig{ - Programs: map[string]chainwriter.ProgramConfig{ + ccipCWConfig := soltypes.ContractWriterConfig{ + Programs: map[string]soltypes.ProgramConfig{ ccipconsts.ContractNameOffRamp: { - Methods: map[string]chainwriter.MethodConfig{ + Methods: map[string]soltypes.MethodConfig{ ccipconsts.MethodExecute: { FromAddress: admin.String(), InputModifications: []codec.ModifierConfig{ @@ -1025,17 +1026,17 @@ func TestChainWriter_CCIPOfframp(t *testing.T) { }, ChainSpecificName: "commit", ArgsTransform: "CCIPCommit", - LookupTables: chainwriter.LookupTables{}, - Accounts: []chainwriter.Lookup{ - {AccountConstant: &chainwriter.AccountConstant{ + LookupTables: soltypes.LookupTables{}, + Accounts: []soltypes.Lookup{ + {AccountConstant: &soltypes.AccountConstant{ Name: "testAcc1", Address: GetRandomPubKey(t).String(), }}, - {AccountConstant: &chainwriter.AccountConstant{ + {AccountConstant: &soltypes.AccountConstant{ Name: "testAcc2", Address: GetRandomPubKey(t).String(), }}, - {AccountConstant: &chainwriter.AccountConstant{ + {AccountConstant: &soltypes.AccountConstant{ Name: "testAcc3", Address: GetRandomPubKey(t).String(), }}, @@ -1235,7 +1236,7 @@ func TestChainWriter_GetTransactionStatus(t *testing.T) { txm := txmMocks.NewTxManager(t) // initialize chain writer - cw, err := chainwriter.NewSolanaChainWriterService(testutils.NewNullLogger(), mc, txm, ge, chainwriter.ChainWriterConfig{}) + cw, err := chainwriter.NewSolanaChainWriterService(testutils.NewNullLogger(), mc, txm, ge, soltypes.ContractWriterConfig{}) require.NoError(t, err) t.Run("returns unknown with error if ID not found", func(t *testing.T) { @@ -1301,7 +1302,7 @@ func TestChainWriter_GetFeeComponents(t *testing.T) { // mock txm txm := txmMocks.NewTxManager(t) - cw, err := chainwriter.NewSolanaChainWriterService(testutils.NewNullLogger(), mc, txm, ge, chainwriter.ChainWriterConfig{}) + cw, err := chainwriter.NewSolanaChainWriterService(testutils.NewNullLogger(), mc, txm, ge, soltypes.ContractWriterConfig{}) require.NoError(t, err) t.Run("returns valid compute unit price and non-nil data availability fee", func(t *testing.T) { @@ -1312,7 +1313,7 @@ func TestChainWriter_GetFeeComponents(t *testing.T) { }) t.Run("fails if gas estimator not set", func(t *testing.T) { - cwNoEstimator, err := chainwriter.NewSolanaChainWriterService(testutils.NewNullLogger(), mc, txm, nil, chainwriter.ChainWriterConfig{}) + cwNoEstimator, err := chainwriter.NewSolanaChainWriterService(testutils.NewNullLogger(), mc, txm, nil, soltypes.ContractWriterConfig{}) require.NoError(t, err) _, err = cwNoEstimator.GetFeeComponents(ctx) require.Error(t, err) diff --git a/pkg/solana/chainwriter/lookups.go b/pkg/solana/chainwriter/lookups.go index a77bdabf3..9609c2bac 100644 --- a/pkg/solana/chainwriter/lookups.go +++ b/pkg/solana/chainwriter/lookups.go @@ -9,6 +9,7 @@ import ( "github.com/gagliardetto/solana-go" "github.com/gagliardetto/solana-go/rpc" + types "github.com/smartcontractkit/chainlink-common/pkg/types/solana" "github.com/smartcontractkit/chainlink-solana/pkg/solana/client" "github.com/smartcontractkit/chainlink-solana/pkg/solana/codec" ) @@ -19,6 +20,10 @@ var ( ErrGettingSeedAtLocation = fmt.Errorf("error getting address seed for location") ) +var _ = Lookup(types.Lookup{}) + +// Lookup is not an alias like the others, because it has a widely used method with solana types that cannot be imported +// in to chainlink-common. However, it can be directly converted from [types.Lookup]. type Lookup struct { Optional bool AccountConstant *AccountConstant `json:"accountConstant,omitempty"` @@ -27,83 +32,35 @@ type Lookup struct { AccountsFromLookupTable *AccountsFromLookupTable `json:"accountsFromLookupTable,omitempty"` } -// AccountConstant represents a fixed address, provided in Base58 format, converted into a `solana.PublicKey`. -type AccountConstant struct { - Name string `json:"name,omitempty"` - Address string `json:"address"` - IsSigner bool `json:"isSigner,omitempty"` - IsWritable bool `json:"isWritable,omitempty"` -} +// Deprecated +type AccountConstant = types.AccountConstant -// AccountLookup dynamically derives an account address from args using a specified location path. -type AccountLookup struct { - Name string `json:"name,omitempty"` - Location string `json:"location"` - // IsSigner and IsWritable can either be a constant bool or a location to a bitmap which decides the bools - IsSigner MetaBool `json:"isSigner,omitempty"` - IsWritable MetaBool `json:"isWritable,omitempty"` -} +// Deprecated +type AccountLookup = types.AccountLookup -type MetaBool struct { - Value bool `json:"value,omitempty"` // bool value - BitmapLocation string `json:"bitmapLocation,omitempty"` // dot separated location of the bitmap -} +// Deprecated +type MetaBool = types.MetaBool -type Seed struct { - Static []byte `json:"static,omitempty"` // Static seed value - Dynamic Lookup `json:"dynamic,omitempty"` // Dynamic lookup for seed -} +// Deprecated +type Seed = types.Seed -// PDALookups generates Program Derived Addresses (PDA) by combining a derived public key with one or more seeds. -type PDALookups struct { - Name string `json:"name,omitempty"` - // The public key of the PDA to be combined with seeds. If there are multiple PublicKeys - // there will be multiple PDAs generated by combining each PublicKey with the seeds. - PublicKey Lookup `json:"publicKey"` - // Seeds to be derived from an additional lookup - Seeds []Seed `json:"seeds"` - IsSigner bool `json:"isSigner,omitempty"` - IsWritable bool `json:"isWritable,omitempty"` - // OPTIONAL: On-chain location and type of desired data from PDA (e.g. a sub-account of the data account) - InternalField InternalField `json:"internalField,omitempty"` -} +// Deprecated +type PDALookups = types.PDALookups -type InternalField struct { - // must map directly to IDL type - TypeName string `json:"typeName"` - Location string `json:"location"` - IDL string `json:"idl"` -} +// Deprecated +type InternalField = types.InternalField -// LookupTables represents a list of lookup tables that are used to derive addresses for a program. -type LookupTables struct { - DerivedLookupTables []DerivedLookupTable `json:"derivedLookupTables,omitempty"` - StaticLookupTables []solana.PublicKey `json:"staticLookupTables,omitempty"` -} +// Deprecated +type LookupTables = types.LookupTables -// DerivedLookupTable represents a lookup table that is used to derive addresses for a program. -type DerivedLookupTable struct { - Name string `json:"name,omitempty"` - Accounts Lookup `json:"accounts"` - Optional bool `json:"optional"` -} +// Deprecated +type DerivedLookupTable = types.DerivedLookupTable -// AccountsFromLookupTable extracts accounts from a lookup table that was previously read and stored in memory. -type AccountsFromLookupTable struct { - LookupTableName string `json:"lookupTableName"` - IncludeIndexes []int `json:"includeIndexes"` -} +// Deprecated +type AccountsFromLookupTable = types.AccountsFromLookupTable -type ATALookup struct { - // Field that determines whether the ATA lookup is necessary. Basically - // just need to check this field exists. Dot separated location. - Location string - // If the field exists, initialize a ATA account using the Wallet, Token Program, and Mint addresses below - WalletAddress Lookup - TokenProgram Lookup // Deprecated: The token program is now fetched from the mint account - MintAddress Lookup - Optional bool -} +// Deprecated +type ATALookup = types.ATALookup func (l Lookup) validate() error { count := 0 @@ -125,18 +82,18 @@ func (l Lookup) Resolve(ctx context.Context, args any, derivedTableMap map[strin return nil, err } if l.AccountConstant != nil { - return l.AccountConstant.Resolve() + return ResolveAccountConstant(l.AccountConstant) } else if l.AccountLookup != nil { - return l.AccountLookup.Resolve(args) + return ResolveAccountLookup(l.AccountLookup, args) } else if l.PDALookups != nil { - return l.PDALookups.Resolve(ctx, args, derivedTableMap, client) + return ResolvePDALookups(ctx, l.PDALookups, args, derivedTableMap, client) } else if l.AccountsFromLookupTable != nil { - return l.AccountsFromLookupTable.Resolve(derivedTableMap) + return ResolveAccountsFromLookupTable(l.AccountsFromLookupTable, derivedTableMap) } return nil, fmt.Errorf("no lookup type specified") } -func (ac AccountConstant) Resolve() ([]*solana.AccountMeta, error) { +func ResolveAccountConstant(ac *AccountConstant) ([]*solana.AccountMeta, error) { address, err := solana.PublicKeyFromBase58(ac.Address) if err != nil { return nil, lookupErrWithName(ac.Name, fmt.Errorf("error getting account from constant: %w", err)) @@ -150,7 +107,7 @@ func (ac AccountConstant) Resolve() ([]*solana.AccountMeta, error) { }, nil } -func (al AccountLookup) Resolve(args any) ([]*solana.AccountMeta, error) { +func ResolveAccountLookup(al *AccountLookup, args any) ([]*solana.AccountMeta, error) { derivedValues, err := GetValuesAtLocation(args, al.Location) if err != nil { return nil, lookupErrWithName(al.Name, fmt.Errorf("%w: %v", ErrLookupNotFoundAtLocation, err)) @@ -222,7 +179,7 @@ func resolveBitMap(mb MetaBool, args any, length int) ([]bool, error) { return result, nil } -func (alt AccountsFromLookupTable) Resolve(derivedTableMap map[string]map[string][]*solana.AccountMeta) ([]*solana.AccountMeta, error) { +func ResolveAccountsFromLookupTable(alt *AccountsFromLookupTable, derivedTableMap map[string]map[string][]*solana.AccountMeta) ([]*solana.AccountMeta, error) { // Fetch the inner map for the specified lookup table name innerMap, ok := derivedTableMap[alt.LookupTableName] if !ok { @@ -252,8 +209,8 @@ func (alt AccountsFromLookupTable) Resolve(derivedTableMap map[string]map[string return result, nil } -func (pda PDALookups) Resolve(ctx context.Context, args any, derivedTableMap map[string]map[string][]*solana.AccountMeta, client client.MultiClient) ([]*solana.AccountMeta, error) { - publicKeys, err := GetAddresses(ctx, args, []Lookup{pda.PublicKey}, derivedTableMap, client) +func ResolvePDALookups(ctx context.Context, pda *PDALookups, args any, derivedTableMap map[string]map[string][]*solana.AccountMeta, client client.MultiClient) ([]*solana.AccountMeta, error) { + publicKeys, err := GetAddresses(ctx, args, []types.Lookup{pda.PublicKey}, derivedTableMap, client) if err != nil { return nil, lookupErrWithName(pda.Name, fmt.Errorf("error getting public key for PDALookups: %w", err)) } @@ -329,7 +286,7 @@ func (pda PDALookups) Resolve(ctx context.Context, args any, derivedTableMap map // to multiple addresses, multiplying the combinations accordingly. func getSeedBytesCombinations( ctx context.Context, - lookup PDALookups, + lookup *PDALookups, args any, derivedTableMap map[string]map[string][]*solana.AccountMeta, client client.MultiClient, @@ -364,7 +321,7 @@ func getSeedBytesCombinations( } } else { // Get address seeds from the lookup - seedAddresses, err := GetAddresses(ctx, args, []Lookup{dynamicSeed}, derivedTableMap, client) + seedAddresses, err := GetAddresses(ctx, args, []types.Lookup{dynamicSeed}, derivedTableMap, client) if err != nil { return nil, fmt.Errorf("error getting address seed: %w", err) } @@ -397,17 +354,13 @@ func getSeedBytesCombinations( return allCombinations, nil } -func (l Lookup) IsNil() bool { - return l.AccountConstant == nil && l.AccountLookup == nil && l.PDALookups == nil && l.AccountsFromLookupTable == nil -} - // generatePDAs generates program-derived addresses (PDAs) from public keys and seeds. // it will result in a list of PDAs whose length is the product of the number of public keys // and the number of seed combinations. func generatePDAs( publicKeys []*solana.AccountMeta, seedCombos [][][]byte, - lookup PDALookups, + lookup *PDALookups, ) ([]*solana.AccountMeta, error) { var results []*solana.AccountMeta for _, publicKeyMeta := range publicKeys { diff --git a/pkg/solana/chainwriter/transform_registry.go b/pkg/solana/chainwriter/transform_registry.go index dc4fdba62..813ec9fed 100644 --- a/pkg/solana/chainwriter/transform_registry.go +++ b/pkg/solana/chainwriter/transform_registry.go @@ -19,7 +19,6 @@ import ( ccip_offramp_v0_1_1 "github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings/v0_1_1/ccip_offramp" "github.com/smartcontractkit/chainlink-ccip/chains/solana/utils/common" "github.com/smartcontractkit/chainlink-ccip/chains/solana/utils/state" - "github.com/smartcontractkit/chainlink-solana/pkg/solana/client" txmutils "github.com/smartcontractkit/chainlink-solana/pkg/solana/txm/utils" ) @@ -105,7 +104,7 @@ func CCIPExecuteArgsTransformV2( IsWritable: MetaBool{BitmapLocation: "ExtraData.ExtraArgsDecoded.accountIsWritableBitmap"}, IsSigner: MetaBool{Value: false}, } - userAccounts, resolveErr := userAccountsLookup.Resolve(args) + userAccounts, resolveErr := ResolveAccountLookup(&userAccountsLookup, args) // If err is ErrLookupNotFoundAtLocation, allow process to continue in case accounts are not needed if resolveErr != nil && !errors.Is(resolveErr, ErrLookupNotFoundAtLocation) { return nil, nil, nil, nil, fmt.Errorf("failed to resolve user accounts: %w", resolveErr) @@ -152,7 +151,7 @@ func CCIPExecuteArgsTransformV2( }) } tokenReceiverLookup := AccountLookup{Name: "TokenReceiver", Location: "ExtraData.ExtraArgsDecoded.tokenReceiver"} - tokenReceivers, resolveErr := tokenReceiverLookup.Resolve(args) + tokenReceivers, resolveErr := ResolveAccountLookup(&tokenReceiverLookup, args) if resolveErr != nil { return nil, nil, nil, nil, fmt.Errorf("failed to find token receiver, required for token transfers: %w", resolveErr) } diff --git a/pkg/solana/codec/anchoridl.go b/pkg/solana/codec/anchoridl.go index 97856a528..54a336500 100644 --- a/pkg/solana/codec/anchoridl.go +++ b/pkg/solana/codec/anchoridl.go @@ -1,508 +1,134 @@ package codec -/* -copied from https://github.com/gagliardetto/anchor-go where the IDL definition is not importable due to being defined -in the `main` package. -*/ +import "github.com/smartcontractkit/chainlink-common/pkg/types/solana" -import ( - "encoding/json" - "fmt" +// Deprecated +type IDL = solana.IDL - "github.com/davecgh/go-spew/spew" - "github.com/gagliardetto/utilz" -) - -// https://github.com/project-serum/anchor/blob/97e9e03fb041b8b888a9876a7c0676d9bb4736f3/ts/src/idl.ts -type IDL struct { - Version string `json:"version"` - Name string `json:"name"` - Instructions []IdlInstruction `json:"instructions"` - Accounts IdlTypeDefSlice `json:"accounts,omitempty"` - Types IdlTypeDefSlice `json:"types,omitempty"` - Events []IdlEvent `json:"events,omitempty"` - Errors []IdlErrorCode `json:"errors,omitempty"` - Constants []IdlConstant `json:"constants,omitempty"` -} - -type IdlConstant struct { - Name string - Type IdlType - Value string -} - -type IdlTypeDefSlice []IdlTypeDef - -func (named IdlTypeDefSlice) GetByName(name string) *IdlTypeDef { - for i := range named { - v := named[i] - if v.Name == name { - return &v - } - } - return nil -} - -type IdlEvent struct { - Name string `json:"name"` - Fields []IdlEventField `json:"fields"` -} - -type IdlEventField struct { - Name string `json:"name"` - Type IdlType `json:"type"` - Index bool `json:"index"` -} - -type IdlInstruction struct { - Name string `json:"name"` - Docs []string `json:"docs"` // @custom - Accounts IdlAccountItemSlice `json:"accounts"` - Args []IdlField `json:"args"` -} - -type IdlAccountItemSlice []IdlAccountItem - -func (slice IdlAccountItemSlice) NumAccounts() (count int) { - for _, item := range slice { - if item.IdlAccount != nil { - count++ - } +// Deprecated +type IdlConstant solana.IdlConstant - if item.IdlAccounts != nil { - count += item.IdlAccounts.Accounts.NumAccounts() - } - } +// Deprecated +type IdlTypeDefSlice = solana.IdlTypeDefSlice - return count -} +// Deprecated +type IdlEvent = solana.IdlEvent -// type IdlAccountItem = IdlAccount | IdlAccounts; -type IdlAccountItem struct { - IdlAccount *IdlAccount - IdlAccounts *IdlAccounts -} +// Deprecated +type IdlEventField = solana.IdlEventField -func (env *IdlAccountItem) UnmarshalJSON(data []byte) error { - var temp interface{} - if err := json.Unmarshal(data, &temp); err != nil { - return err - } - - if temp == nil { - return fmt.Errorf("envelope is nil: %v", env) - } - - switch v := temp.(type) { - case map[string]interface{}: - if len(v) == 0 { - return nil - } - - _, hasAccounts := v["accounts"] - _, hasIsMut := v["isMut"] - - if hasAccounts == hasIsMut { - return fmt.Errorf("invalid idl structure: expected exactly one of 'accounts' or 'isMut'") - } - - if hasAccounts { - return utilz.TranscodeJSON(temp, &env.IdlAccounts) - } - - return utilz.TranscodeJSON(temp, &env.IdlAccount) - default: - return fmt.Errorf("unknown kind: %s", spew.Sdump(temp)) - } -} +// Deprecated +type IdlInstruction = solana.IdlInstruction -func (env IdlAccountItem) MarshalJSON() ([]byte, error) { - if (env.IdlAccount == nil) == (env.IdlAccounts == nil) { - return nil, fmt.Errorf("invalid structure: expected either IdlAccount or IdlAccounts to be defined") - } - - visited := make(map[*IdlAccounts]struct{}) - if err := checkForIdlAccountsCycle(env.IdlAccounts, visited); err != nil { - return nil, err - } - - var result interface{} - if env.IdlAccounts != nil { - result = map[string]interface{}{ - "accounts": env.IdlAccounts, - } - } else { - result = env.IdlAccount - } - - return json.Marshal(result) -} +// Deprecated +type IdlAccountItemSlice = solana.IdlAccountItem -func checkForIdlAccountsCycle(acc *IdlAccounts, visited map[*IdlAccounts]struct{}) error { - if acc == nil { - return nil - } - - if _, exists := visited[acc]; exists { - return fmt.Errorf("cycle detected in IdlAccounts named %q", acc.Name) - } - visited[acc] = struct{}{} - - for _, item := range acc.Accounts { - if (item.IdlAccount == nil) == (item.IdlAccounts == nil) { - return fmt.Errorf("invalid nested structure: expected either IdlAccount or IdlAccounts to be defined") - } - if item.IdlAccounts != nil { - if err := checkForIdlAccountsCycle(item.IdlAccounts, visited); err != nil { - return err - } - } - } - return nil -} +// Deprecated +type IdlAccountItem = solana.IdlAccountItem -type IdlAccount struct { - Docs []string `json:"docs"` // @custom - Name string `json:"name"` - IsMut bool `json:"isMut"` - IsSigner bool `json:"isSigner"` - Optional bool `json:"optional"` // @custom -} +// Deprecated +type IdlAccount = solana.IdlAccounts -// A nested/recursive version of IdlAccount. -type IdlAccounts struct { - Name string `json:"name"` - Docs []string `json:"docs"` // @custom - Accounts IdlAccountItemSlice `json:"accounts"` -} +// Deprecated +type IdlAccounts = solana.IdlAccounts -type IdlField struct { - Name string `json:"name"` - Docs []string `json:"docs"` // @custom - Type IdlType `json:"type"` -} +// Deprecated +type IdlField = solana.IdlField -// PDA is a struct that does not correlate to an official IDL type -// It is needed to encode seeds to calculate the address for PDA account reads -type PDATypeDef struct { - Prefix []byte `json:"prefix,omitempty"` - Seeds []PDASeed `json:"seeds,omitempty"` -} +// Deprecated +type PDATypeDef = solana.PDATypeDef -type PDASeed struct { - Name string `json:"name"` - Type IdlType `json:"type"` -} +// Deprecated +type PDASeed = solana.PDASeed -type IdlTypeAsString string +// Deprecated +type IdlTypeAsString = solana.IdlTypeAsString +// Deprecated const ( - IdlTypeBool IdlTypeAsString = "bool" - IdlTypeU8 IdlTypeAsString = "u8" - IdlTypeI8 IdlTypeAsString = "i8" - IdlTypeU16 IdlTypeAsString = "u16" - IdlTypeI16 IdlTypeAsString = "i16" - IdlTypeU32 IdlTypeAsString = "u32" - IdlTypeI32 IdlTypeAsString = "i32" - IdlTypeU64 IdlTypeAsString = "u64" - IdlTypeI64 IdlTypeAsString = "i64" - IdlTypeU128 IdlTypeAsString = "u128" - IdlTypeI128 IdlTypeAsString = "i128" - IdlTypeBytes IdlTypeAsString = "bytes" - IdlTypeString IdlTypeAsString = "string" - IdlTypePublicKey IdlTypeAsString = "publicKey" + IdlTypeBool = solana.IdlTypeBool + IdlTypeU8 = solana.IdlTypeU8 + IdlTypeI8 = solana.IdlTypeI8 + IdlTypeU16 = solana.IdlTypeU16 + IdlTypeI16 = solana.IdlTypeI16 + IdlTypeU32 = solana.IdlTypeU32 + IdlTypeI32 = solana.IdlTypeI32 + IdlTypeU64 = solana.IdlTypeU64 + IdlTypeI64 = solana.IdlTypeI64 + IdlTypeU128 = solana.IdlTypeU128 + IdlTypeI128 = solana.IdlTypeI128 + IdlTypeBytes = solana.IdlTypeBytes + IdlTypeString = solana.IdlTypeString + IdlTypePublicKey = solana.IdlTypePublicKey // Custom additions: - IdlTypeUnixTimestamp IdlTypeAsString = "unixTimestamp" - IdlTypeHash IdlTypeAsString = "hash" - IdlTypeDuration IdlTypeAsString = "duration" + IdlTypeUnixTimestamp = solana.IdlTypeUnixTimestamp + IdlTypeHash = solana.IdlTypeHash + IdlTypeDuration = solana.IdlTypeDuration ) -type IdlTypeVec struct { - Vec IdlType `json:"vec"` -} +// Deprecated +type IdlTypeVec = solana.IdlTypeVec -type IdlTypeOption struct { - Option IdlType `json:"option"` -} +// Deprecated +type IdlTypeOption = solana.IdlType -// User defined type. -type IdlTypeDefined struct { - Defined string `json:"defined"` -} +// Deprecated +type IdlTypeDefined = solana.IdlTypeDefined -// Wrapper type: -type IdlTypeArray struct { - Thing IdlType - Num int -} +// Deprecated +type IdlTypeArray = solana.IdlTypeArray -func (env IdlType) MarshalJSON() ([]byte, error) { - var result interface{} - switch { - case env.IsString(): - result = env.GetString() - case env.IsIdlTypeVec(): - result = env.GetIdlTypeVec() - case env.IsIdlTypeOption(): - result = env.GetIdlTypeOption() - case env.IsIdlTypeDefined(): - result = env.GetIdlTypeDefined() - case env.IsArray(): - array := env.GetArray() - result = map[string]interface{}{ - "array": []interface{}{array.Thing, array.Num}, - } - default: - return nil, fmt.Errorf("nil envelope is not supported in IdlType") - } - - return json.Marshal(result) -} - -func (env *IdlType) UnmarshalJSON(data []byte) error { - var temp interface{} - if err := json.Unmarshal(data, &temp); err != nil { - return err - } - - if temp == nil { - return fmt.Errorf("envelope is nil: %v", env) - } - - switch v := temp.(type) { - case string: - env.AsString = IdlTypeAsString(v) - case map[string]interface{}: - if len(v) == 0 { - return nil - } - - var typeFound bool - if _, ok := v["vec"]; ok { - var target IdlTypeVec - if err := utilz.TranscodeJSON(temp, &target); err != nil { - return err - } - typeFound = true - env.AsIdlTypeVec = &target - } - if _, ok := v["option"]; ok { - if typeFound { - return fmt.Errorf("multiple types found for IdlType: %s", spew.Sdump(temp)) - } - var target IdlTypeOption - if err := utilz.TranscodeJSON(temp, &target); err != nil { - return err - } - typeFound = true - env.asIdlTypeOption = &target - } - if _, ok := v["defined"]; ok { - if typeFound { - return fmt.Errorf("multiple types found for IdlType: %s", spew.Sdump(temp)) - } - var target IdlTypeDefined - if err := utilz.TranscodeJSON(temp, &target); err != nil { - return err - } - typeFound = true - env.AsIdlTypeDefined = &target - } - if got, ok := v["array"]; ok { - if typeFound { - return fmt.Errorf("multiple types found for IdlType: %s", spew.Sdump(temp)) - } - arrVal, ok := got.([]interface{}) - if !ok { - return fmt.Errorf("array is not in expected format: %s", spew.Sdump(got)) - } - if len(arrVal) != 2 { - return fmt.Errorf("array is not of expected length: %s", spew.Sdump(got)) - } - var target IdlTypeArray - if err := utilz.TranscodeJSON(arrVal[0], &target.Thing); err != nil { - return err - } - num, ok := arrVal[1].(float64) - if !ok { - return fmt.Errorf("value is unexpected type: %T, expected float64", arrVal[1]) - } - target.Num = int(num) - env.AsIdlTypeArray = &target - } - default: - return fmt.Errorf("Unknown kind: %s", spew.Sdump(temp)) - } - - return nil -} - -// Wrapper type: -type IdlType struct { - AsString IdlTypeAsString - AsIdlTypeVec *IdlTypeVec - asIdlTypeOption *IdlTypeOption - AsIdlTypeDefined *IdlTypeDefined - AsIdlTypeArray *IdlTypeArray -} +// Deprecated +type IdlType = solana.IdlType +// Deprecated func NewIdlStringType(asString IdlTypeAsString) IdlType { - return IdlType{ - AsString: asString, - } -} - -func (env *IdlType) IsString() bool { - return env.AsString != "" -} -func (env *IdlType) IsIdlTypeVec() bool { - return env.AsIdlTypeVec != nil -} -func (env *IdlType) IsIdlTypeOption() bool { - return env.asIdlTypeOption != nil -} -func (env *IdlType) IsIdlTypeDefined() bool { - return env.AsIdlTypeDefined != nil -} -func (env *IdlType) IsArray() bool { - return env.AsIdlTypeArray != nil -} - -// Getters: -func (env *IdlType) GetString() IdlTypeAsString { - return env.AsString -} -func (env *IdlType) GetIdlTypeVec() *IdlTypeVec { - return env.AsIdlTypeVec -} -func (env *IdlType) GetIdlTypeOption() *IdlTypeOption { - return env.asIdlTypeOption -} -func (env *IdlType) GetIdlTypeDefined() *IdlTypeDefined { - return env.AsIdlTypeDefined -} -func (env *IdlType) GetArray() *IdlTypeArray { - return env.AsIdlTypeArray + return solana.NewIdlStringType(asString) } -type IdlTypeDef struct { - Name string `json:"name"` - Type IdlTypeDefTy `json:"type"` -} +// Deprecated +type IdlTypeDef = solana.IdlTypeDef -type IdlTypeDefTyKind string +// Deprecated +type IdlTypeDefTyKind = solana.IdlTypeDefTyKind +// Deprecated const ( - IdlTypeDefTyKindStruct IdlTypeDefTyKind = "struct" - IdlTypeDefTyKindEnum IdlTypeDefTyKind = "enum" - IdlTypeDefTyKindCustom IdlTypeDefTyKind = "custom" + IdlTypeDefTyKindStruct = solana.IdlTypeDefTyKindStruct + IdlTypeDefTyKindEnum = solana.IdlTypeDefTyKindEnum + IdlTypeDefTyKindCustom = solana.IdlTypeDefTyKindCustom ) -type IdlTypeDefTyStruct struct { - Kind IdlTypeDefTyKind `json:"kind"` // == "struct" +// Deprecated +type IdlTypeDefTyStruct = solana.IdlTypeDefTyStruct - Fields *IdlTypeDefStruct `json:"fields,omitempty"` -} - -type IdlTypeDefTyEnum struct { - Kind IdlTypeDefTyKind `json:"kind"` // == "enum" - - Variants IdlEnumVariantSlice `json:"variants,omitempty"` -} +// Deprecated +type IdlTypeDefTyEnum = solana.IdlTypeDefTyEnum -var NilIdlTypeDefTy = IdlTypeDef{Type: IdlTypeDefTy{ - Kind: "struct", - Fields: &IdlTypeDefStruct{}, -}} +// Deprecated +var NilIdlTypeDefTy = solana.NilIdlTypeDefTy -type IdlTypeDefTy struct { - Kind IdlTypeDefTyKind `json:"kind"` +// Deprecated +type IdlTypeDefTy = solana.IdlTypeDefTy - Fields *IdlTypeDefStruct `json:"fields,omitempty"` - Variants IdlEnumVariantSlice `json:"variants,omitempty"` - Codec string `json:"codec,omitempty"` -} +// Deprecated +type IdlEnumVariantSlice = solana.IdlEnumVariantSlice -type IdlEnumVariantSlice []IdlEnumVariant +// Deprecated +type IdlTypeDefStruct = solana.IdlTypeDefStruct -func (slice IdlEnumVariantSlice) IsAllUint8() bool { - for _, elem := range slice { - if !elem.IsUint8() { - return false - } - } - return true -} +// Deprecated +type IdlEnumVariant = solana.IdlEnumVariant -func (slice IdlEnumVariantSlice) IsSimpleEnum() bool { - return slice.IsAllUint8() -} +// Deprecated +type IdlEnumFields = solana.IdlEnumFields -type IdlTypeDefStruct = []IdlField +// Deprecated +type IdlEnumFieldsNamed solana.IdlEnumFieldsNamed -type IdlEnumVariant struct { - Name string `json:"name"` - Docs []string `json:"docs"` // @custom - Fields *IdlEnumFields `json:"fields,omitempty"` -} +// Deprecated +type IdlEnumFieldsTuple = solana.IdlEnumFieldsTuple -func (variant *IdlEnumVariant) IsUint8() bool { - // it's a simple uint8 if there is no fields data - return variant.Fields == nil -} - -// type IdlEnumFields = IdlEnumFieldsNamed | IdlEnumFieldsTuple; -type IdlEnumFields struct { - IdlEnumFieldsNamed *IdlEnumFieldsNamed - IdlEnumFieldsTuple *IdlEnumFieldsTuple -} - -type IdlEnumFieldsNamed []IdlField - -type IdlEnumFieldsTuple []IdlType - -// TODO: verify with examples -func (env *IdlEnumFields) UnmarshalJSON(data []byte) error { - var temp any - if err := json.Unmarshal(data, &temp); err != nil { - return err - } - - if temp == nil { - return fmt.Errorf("envelope is nil: %v", env) - } - - switch v := temp.(type) { - case []any: - if len(v) == 0 { - return nil - } - - firstItem := v[0] - - if _, ok := firstItem.(map[string]any)["name"]; ok { - // TODO: - // If has `name` field, then it's most likely a IdlEnumFieldsNamed. - return utilz.TranscodeJSON(temp, &env.IdlEnumFieldsNamed) - } - return utilz.TranscodeJSON(temp, &env.IdlEnumFieldsTuple) - case map[string]any: - // Only one or the other field is set. Returning early is safe - if named, ok := v["IdlEnumFieldsNamed"]; ok { - return utilz.TranscodeJSON(named, &env.IdlEnumFieldsNamed) - } - if tuple, ok := v["IdlEnumFieldsTuple"]; ok { - return utilz.TranscodeJSON(tuple, &env.IdlEnumFieldsTuple) - } - return fmt.Errorf("Unknown type: %s", spew.Sdump(v)) - default: - return fmt.Errorf("Unknown kind: %s", spew.Sdump(temp)) - } -} - -type IdlErrorCode struct { - Code int `json:"code"` - Name string `json:"name"` - Msg string `json:"msg,omitempty"` -} +// Deprecated +type IdlErrorCode = solana.IdlErrorCode diff --git a/pkg/solana/config/chain_reader.go b/pkg/solana/config/chain_reader.go index bce9f352a..c6f7bcc46 100644 --- a/pkg/solana/config/chain_reader.go +++ b/pkg/solana/config/chain_reader.go @@ -1,14 +1,9 @@ package config import ( - "encoding/json" - "fmt" "time" - commoncodec "github.com/smartcontractkit/chainlink-common/pkg/codec" - commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" - - "github.com/smartcontractkit/chainlink-solana/pkg/solana/codec" + "github.com/smartcontractkit/chainlink-common/pkg/types/solana" ) const ( @@ -18,6 +13,9 @@ const ( DefaultIncludeReverted = false ) +var _ = PollingFilter(solana.PollingFilter{}) + +// PollingFilter is directly convertable from solana.PollingFilter, and extends it with methods. type PollingFilter struct { Retention *time.Duration `json:"retention,omitempty"` // maximum amount of time to retain logs MaxLogsKept *int64 `json:"maxLogsKept,omitempty"` // maximum number of logs to retain ( 0 = unlimited ) @@ -56,144 +54,29 @@ func (f PollingFilter) GetIncludeReverted() bool { return *f.IncludeReverted } -type ContractReader struct { - Namespaces map[string]ChainContractReader `json:"namespaces"` - // AddressShareGroups lists namespaces groups that share the same address. - // Whichever namespace or i.e. Binding from the list is Bound first will share that address with the rest of the group. - // Namespaces that were bound after the first one still have to be Bound to be initialised. - // If they are Bound with an empty address string, they will use the address of the first Bound contract. - // If they are Bound with a non-empty address string, an error will be thrown unless the address matches the address of the first Bound shared contract. - AddressShareGroups [][]string `json:"addressShareGroups,omitempty"` -} - -type ChainContractReader struct { - codec.IDL `json:"anchorIDL"` - *PollingFilter `json:"pollingFilter,omitempty"` - // Reads key is the off-chain name for this read. - Reads map[string]ReadDefinition `json:"reads"` -} +// Deprecated +type ContractReader = solana.ContractReader -type EventDefinitions struct { - IndexedField0 *IndexedField `json:"indexedField0"` - IndexedField1 *IndexedField `json:"indexedField1"` - IndexedField2 *IndexedField `json:"indexedField2"` - IndexedField3 *IndexedField `json:"indexedField3"` - // PollingFilter should be defined on a contract level in ContractPollingFilter, unless event needs to override the - // contract level filter options. - *PollingFilter `json:"pollingFilter,omitempty"` -} +// Deprecated +type ChainContractReader = solana.ChainContractReader -type MultiReader struct { - // Reads is a list of reads that is sequentially read to fill out a complete response for the parent read. - // Parent ReadDefinition has to define codec modifiers which adds fields that are to be filled out by the reads in Reads. - Reads []ReadDefinition `json:"reads,omitempty"` - // ReuseParams If true, params from parent read will be reused for all MultiReader Reads. - ReuseParams bool `json:"reuseParams"` -} +// Deprecated +type EventDefinitions = solana.EventDefinitions -type ReadDefinition struct { - ChainSpecificName string `json:"chainSpecificName"` - ReadType ReadType `json:"readType,omitempty"` - ErrOnMissingAccountData bool `json:"errOnMissingAccountData,omitempty"` - InputModifications commoncodec.ModifiersConfig `json:"inputModifications,omitempty"` - OutputModifications commoncodec.ModifiersConfig `json:"outputModifications,omitempty"` - PDADefinition codec.PDATypeDef `json:"pdaDefinition,omitempty"` // Only used for PDA account reads - MultiReader *MultiReader `json:"multiReader,omitempty"` - EventDefinitions *EventDefinitions `json:"eventDefinitions,omitempty"` - // ResponseAddressHardCoder hardcodes the address of the contract into the defined field in the response. - ResponseAddressHardCoder *commoncodec.HardCodeModifierConfig `json:"responseAddressHardCoder,omitempty"` -} +// Deprecated +type MultiReader = solana.MultiReader -func (d ReadDefinition) HasPollingFilter() bool { - return d.EventDefinitions != nil && d.EventDefinitions.PollingFilter != nil -} +// Deprecated +type ReadDefinition = solana.ReadDefinition -type ReadType int +// Deprecated +type ReadType = solana.ReadType +// Deprecated const ( - Account ReadType = iota - Event + Account = solana.Account + Event = solana.Event ) -func (r ReadType) String() string { - switch r { - case Account: - return "Account" - case Event: - return "Event" - default: - return fmt.Sprintf("Unknown(%d)", r) - } -} - -type IndexedField struct { - OffChainPath string `json:"offChainPath"` - OnChainPath string `json:"onChainPath"` -} - -func (c *ContractReader) UnmarshalJSON(bytes []byte) error { - rawJSON := make(map[string]json.RawMessage) - if err := json.Unmarshal(bytes, &rawJSON); err != nil { - return err - } - - c.Namespaces = make(map[string]ChainContractReader) - if err := json.Unmarshal(rawJSON["namespaces"], &c.Namespaces); err != nil { - return err - } - - if rawJSON["addressShareGroups"] != nil { - if err := json.Unmarshal(rawJSON["addressShareGroups"], &c.AddressShareGroups); err != nil { - return err - } - } - - if c.AddressShareGroups != nil { - seen := make(map[string][]string) - for _, group := range c.AddressShareGroups { - for _, namespace := range group { - if seenIn, alreadySeen := seen[namespace]; alreadySeen { - return fmt.Errorf("namespace %s is already in share group %v: %w", namespace, seenIn, commontypes.ErrInvalidConfig) - } - seen[namespace] = group - } - } - } - - return nil -} - -func (c *ChainContractReader) UnmarshalJSON(bytes []byte) error { - rawJSON := make(map[string]json.RawMessage) - if err := json.Unmarshal(bytes, &rawJSON); err != nil { - return err - } - - idlBytes := rawJSON["anchorIDL"] - var rawString string - if err := json.Unmarshal(idlBytes, &rawString); err == nil { - if err = json.Unmarshal([]byte(rawString), &c.IDL); err != nil { - return fmt.Errorf("failed to parse anchorIDL string as IDL struct: %w", err) - } - return nil - } - - // If we didn't get a string, attempt to parse directly as an IDL object - if err := json.Unmarshal(idlBytes, &c.IDL); err != nil { - return fmt.Errorf("anchorIDL field is neither a valid JSON string nor a valid IDL object: %w", err) - } - - if len(c.IDL.Accounts) == 0 && len(c.IDL.Events) == 0 { - return fmt.Errorf("namespace idl must have at least one account or event: %w", commontypes.ErrInvalidConfig) - } - - if err := json.Unmarshal(rawJSON["reads"], &c.Reads); err != nil { - return err - } - - if len(c.Reads) == 0 { - return fmt.Errorf("namespace must have at least one read: %w", commontypes.ErrInvalidConfig) - } - - return nil -} +// Deprecated +type IndexedField = solana.IndexedField