From b73053960dae4266cedfe95c4d761b5d7d58ff7e Mon Sep 17 00:00:00 2001 From: yashnevatia Date: Tue, 12 May 2026 10:35:23 +0100 Subject: [PATCH 1/9] Add cap-dev branch --- go.mod | 63 +++++++++++++-------------- go.sum | 132 ++++++++++++++++++++++++++++----------------------------- 2 files changed, 98 insertions(+), 97 deletions(-) diff --git a/go.mod b/go.mod index ffb6c346..a944ddc9 100644 --- a/go.mod +++ b/go.mod @@ -24,16 +24,16 @@ require ( github.com/pkg/errors v0.9.1 github.com/rs/zerolog v1.34.0 github.com/smartcontractkit/chain-selectors v1.0.98 - github.com/smartcontractkit/chainlink-common v0.11.2-0.20260421191147-d10b9943ac71 - github.com/smartcontractkit/chainlink-common/keystore v1.0.2 + github.com/smartcontractkit/chainlink-common v0.11.2-0.20260505124104-72181f5345ce + github.com/smartcontractkit/chainlink-common/keystore v1.1.0 github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20260119171452-39c98c3b33cd - github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260420204255-a3f3bdd56877 + github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260511222622-3dae6143f38a github.com/smartcontractkit/chainlink-protos/workflows/go v0.0.0-20260323124644-faea187e6997 github.com/smartcontractkit/chainlink-testing-framework/seth v1.51.5 github.com/smartcontractkit/chainlink/deployment v0.0.0-20260422181348-efa818697ce5 - github.com/smartcontractkit/chainlink/v2 v2.29.1-cre-beta.0.0.20260422181348-efa818697ce5 - github.com/smartcontractkit/cre-sdk-go v1.7.0 - github.com/smartcontractkit/cre-sdk-go/capabilities/blockchain/evm v1.0.0-beta.9 + github.com/smartcontractkit/chainlink/v2 v2.46.0 + github.com/smartcontractkit/cre-sdk-go v1.5.0 + github.com/smartcontractkit/cre-sdk-go/capabilities/blockchain/evm v1.0.0-beta.6.0.20260330204130-964a5b106d0c github.com/smartcontractkit/mcms v0.41.1 github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20251120172354-e8ec0386b06c github.com/spf13/cobra v1.10.2 @@ -41,8 +41,8 @@ require ( github.com/spf13/viper v1.21.0 github.com/stretchr/testify v1.11.1 github.com/test-go/testify v1.1.4 - go.uber.org/zap v1.27.1 - golang.org/x/term v0.41.0 + go.uber.org/zap v1.28.0 + golang.org/x/term v0.42.0 google.golang.org/protobuf v1.36.11 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 @@ -86,7 +86,7 @@ require ( github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect github.com/bits-and-blooms/bitset v1.24.0 // indirect github.com/blendle/zapdriver v1.3.1 // indirect - github.com/block-vision/sui-go-sdk v1.1.4 // indirect + github.com/block-vision/sui-go-sdk v1.2.1 // indirect github.com/btcsuite/btcd v0.24.2 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect github.com/btcsuite/btcd/btcutil v1.1.6 // indirect @@ -211,7 +211,7 @@ require ( github.com/hashicorp/go-hclog v1.6.3 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-metrics v0.5.4 // indirect - github.com/hashicorp/go-plugin v1.7.0 // indirect + github.com/hashicorp/go-plugin v1.8.0 // indirect github.com/hashicorp/golang-lru v1.0.2 // indirect github.com/hashicorp/yamux v0.1.2 // indirect github.com/hasura/go-graphql-client v0.15.1 // indirect @@ -310,31 +310,31 @@ require ( github.com/shopspring/decimal v1.4.0 // indirect github.com/sigurn/crc16 v0.0.0-20211026045750-20ab5afb07e3 // indirect github.com/smartcontractkit/ccip-owner-contracts v0.1.0 // indirect - github.com/smartcontractkit/chainlink-aptos v0.0.0-20260407161350-a86b1969da65 // indirect + github.com/smartcontractkit/chainlink-aptos v0.0.0-20260430175646-295a7f9a1500 // indirect github.com/smartcontractkit/chainlink-automation v0.8.1 // indirect - github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20260417153334-3b564ef614de // indirect - github.com/smartcontractkit/chainlink-ccip/chains/evm v0.0.0-20260415165642-49f23e4d76cc // indirect + github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20260428205619-2db1389501a1 // indirect + github.com/smartcontractkit/chainlink-ccip/chains/evm v0.0.0-20260428205619-2db1389501a1 // indirect github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260415165642-49f23e4d76cc // indirect github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260415165642-49f23e4d76cc // indirect github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10 // indirect - github.com/smartcontractkit/chainlink-data-streams v0.1.13 // indirect - github.com/smartcontractkit/chainlink-deployments-framework v0.95.0 // indirect - github.com/smartcontractkit/chainlink-evm v0.3.4-0.20260416173445-80f6efde0a03 // indirect + github.com/smartcontractkit/chainlink-data-streams v0.1.14-0.20260504075031-e5aae8c82e91 // indirect + github.com/smartcontractkit/chainlink-deployments-framework v0.96.0 // indirect + github.com/smartcontractkit/chainlink-evm v0.3.4-0.20260504070828-3216bb63d886 // indirect github.com/smartcontractkit/chainlink-evm/contracts/cre/gobindings v0.0.0-20260403151002-2c91155b5501 // indirect - github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-20250818175541-3389ac08a563 // indirect - github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20260326122810-b657beadfb57 // indirect - github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20260410144512-ca02ad6ed16a // indirect - github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20260410144512-ca02ad6ed16a // indirect + github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-20260423135514-5b1a7565a99c // indirect + github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20260423135514-5b1a7565a99c // indirect + github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20260423135514-5b1a7565a99c // indirect + github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20260423135514-5b1a7565a99c // indirect github.com/smartcontractkit/chainlink-protos/billing/go v0.0.0-20251024234028-0988426d98f4 // indirect github.com/smartcontractkit/chainlink-protos/job-distributor v0.18.0 // indirect github.com/smartcontractkit/chainlink-protos/linking-service/go v0.0.0-20251002192024-d2ad9222409b // indirect - github.com/smartcontractkit/chainlink-protos/node-platform v0.0.0-20260319180422-b5808c964785 // indirect + github.com/smartcontractkit/chainlink-protos/node-platform v0.0.0-20260430172634-acccf17ece83 // indirect github.com/smartcontractkit/chainlink-protos/ring/go v0.0.0-20260331131315-f08a616d8dcd // indirect github.com/smartcontractkit/chainlink-protos/storage-service v0.3.0 // indirect - github.com/smartcontractkit/chainlink-protos/svr v1.1.1-0.20260203131522-bb8bc5c423b3 // indirect - github.com/smartcontractkit/chainlink-solana v1.1.2-0.20260421131224-c46cbfe7bc6c // indirect - github.com/smartcontractkit/chainlink-sui v0.0.0-20260409184948-5b16fae57fe0 // indirect - github.com/smartcontractkit/chainlink-ton v0.0.0-20260415120434-cecc380f8d87 // indirect + github.com/smartcontractkit/chainlink-protos/svr v1.2.0 // indirect + github.com/smartcontractkit/chainlink-solana v1.1.2-0.20260428170719-7ad4e58aaacf // indirect + github.com/smartcontractkit/chainlink-sui v0.0.0-20260427132612-76b9f754a556 // indirect + github.com/smartcontractkit/chainlink-ton v0.0.0-20260423161209-5ce1dba9785e // indirect github.com/smartcontractkit/chainlink-tron/relayer v0.0.11-0.20260408092456-3c6369888d4a // indirect github.com/smartcontractkit/freeport v0.1.3-0.20250828155247-add56fa28aad // indirect github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 // indirect @@ -400,22 +400,23 @@ require ( go.opentelemetry.io/otel/sdk/metric v1.43.0 // indirect go.opentelemetry.io/otel/trace v1.43.0 // indirect go.opentelemetry.io/proto/otlp v1.10.0 // indirect + go.uber.org/goleak v1.3.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/ratelimit v0.3.1 // indirect go.yaml.in/yaml/v2 v2.4.4 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect golang.org/x/arch v0.11.0 // indirect - golang.org/x/crypto v0.49.0 // indirect + golang.org/x/crypto v0.50.0 // indirect golang.org/x/exp v0.0.0-20260218203240-3dfff04db8fa // indirect - golang.org/x/mod v0.33.0 // indirect + golang.org/x/mod v0.34.0 // indirect golang.org/x/net v0.52.0 // indirect golang.org/x/oauth2 v0.36.0 // indirect golang.org/x/sync v0.20.0 // indirect - golang.org/x/sys v0.42.0 // indirect - golang.org/x/telemetry v0.0.0-20260209163413-e7419c687ee4 // indirect - golang.org/x/text v0.35.0 // indirect + golang.org/x/sys v0.43.0 // indirect + golang.org/x/telemetry v0.0.0-20260311193753-579e4da9a98c // indirect + golang.org/x/text v0.36.0 // indirect golang.org/x/time v0.15.0 // indirect - golang.org/x/tools v0.42.0 // indirect + golang.org/x/tools v0.43.0 // indirect golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect gonum.org/v1/gonum v0.17.0 // indirect google.golang.org/genproto v0.0.0-20250505200425-f936aa4a68b2 // indirect diff --git a/go.sum b/go.sum index 6fa0e20d..f687b0fd 100644 --- a/go.sum +++ b/go.sum @@ -193,8 +193,8 @@ github.com/bits-and-blooms/bitset v1.24.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6 github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/blendle/zapdriver v1.3.1 h1:C3dydBOWYRiOk+B8X9IVZ5IOe+7cl+tGOexN4QqHfpE= github.com/blendle/zapdriver v1.3.1/go.mod h1:mdXfREi6u5MArG4j9fewC+FGnXaBR+T4Ox4J2u4eHCc= -github.com/block-vision/sui-go-sdk v1.1.4 h1:1PPgYxQjo1P9UCgFOPTvDCuGEglRL32NwjKPulR4FQk= -github.com/block-vision/sui-go-sdk v1.1.4/go.mod h1:t8mWASwfyv+EyqHGO9ZrcDiCJWGOFEXqq50TMJ8GQco= +github.com/block-vision/sui-go-sdk v1.2.1 h1:uwvGbzfcrS4SsIaakclYxy0qgEF1XWIUtTYWXB4PoAw= +github.com/block-vision/sui-go-sdk v1.2.1/go.mod h1:t8mWASwfyv+EyqHGO9ZrcDiCJWGOFEXqq50TMJ8GQco= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd v0.22.0-beta.0.20220111032746-97732e52810c/go.mod h1:tjmYdS6MLJ5/s0Fj4DbLgSbDHbEqLJrtnHecBFkdz5M= github.com/btcsuite/btcd v0.23.5-0.20231215221805-96c9fd8078fd/go.mod h1:nm3Bko6zh6bWP60UxwoT5LzdGJsQJaPo6HjduXq9p6A= @@ -776,8 +776,8 @@ github.com/hashicorp/go-metrics v0.5.4 h1:8mmPiIJkTPPEbAiV97IxdAGNdRdaWwVap1BU6e github.com/hashicorp/go-metrics v0.5.4/go.mod h1:CG5yz4NZ/AI/aQt9Ucm/vdBnbh7fvmv4lxZ350i+QQI= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-plugin v1.7.0 h1:YghfQH/0QmPNc/AZMTFE3ac8fipZyZECHdDPshfk+mA= -github.com/hashicorp/go-plugin v1.7.0/go.mod h1:BExt6KEaIYx804z8k4gRzRLEvxKVb+kn0NMcihqOqb8= +github.com/hashicorp/go-plugin v1.8.0 h1:ie8S6RRY8RvB2usYZv+AAZ/wBvx2AU5p5QeP5j/FORs= +github.com/hashicorp/go-plugin v1.8.0/go.mod h1:BExt6KEaIYx804z8k4gRzRLEvxKVb+kn0NMcihqOqb8= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-retryablehttp v0.7.8 h1:ylXZWnqa7Lhqpk0L1P1LzDtGcCR0rPVUrx/c8Unxc48= github.com/hashicorp/go-retryablehttp v0.7.8/go.mod h1:rjiScheydd+CxvumBsIrFKlx3iS0jrZ7LvzFGFmuKbw= @@ -1307,50 +1307,50 @@ github.com/smartcontractkit/ccip-owner-contracts v0.1.0 h1:GiBDtlx7539o7AKlDV+9L github.com/smartcontractkit/ccip-owner-contracts v0.1.0/go.mod h1:NnT6w4Kj42OFFXhSx99LvJZWPpMjmo4+CpDEWfw61xY= github.com/smartcontractkit/chain-selectors v1.0.98 h1:fuI7CQ1o5cX64eO4/LvwtfhdpGFH5vnsM/bFHRwEiww= github.com/smartcontractkit/chain-selectors v1.0.98/go.mod h1:qy7whtgG5g+7z0jt0nRyii9bLND9m15NZTzuQPkMZ5w= -github.com/smartcontractkit/chainlink-aptos v0.0.0-20260407161350-a86b1969da65 h1:b6+ZvoZxXSj7HywoZ0CfWtC6k47eBSaxNzc2LqtiXBA= -github.com/smartcontractkit/chainlink-aptos v0.0.0-20260407161350-a86b1969da65/go.mod h1:BbVsx2VcwSVWkd0C5TcAkQBnFaeYFnogJgUa9BUla18= +github.com/smartcontractkit/chainlink-aptos v0.0.0-20260430175646-295a7f9a1500 h1:045jrHCLI+MpeAyByJkyHbEjq0+aTPt04C7+sbsNNtw= +github.com/smartcontractkit/chainlink-aptos v0.0.0-20260430175646-295a7f9a1500/go.mod h1:zfE2R7887kiwXkGTHKPe5NBgwhFwIC3pnA2uAxrbvig= 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.20260417153334-3b564ef614de h1:coysmw4zHm6TLOZawoe2h0hHh/25ft+hq9+9mRNkqTs= -github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20260417153334-3b564ef614de/go.mod h1:1XxxpkgCmG/z6y30yRuVrcxre6zixIVX3xzi706Db/8= -github.com/smartcontractkit/chainlink-ccip/ccv/chains/evm v0.0.0-20260406180811-0ec22f0243a4 h1:b6IxxglkWivZ5nfYdYkHF4w0l2BJyEmSdyMYRm47aB4= -github.com/smartcontractkit/chainlink-ccip/ccv/chains/evm v0.0.0-20260406180811-0ec22f0243a4/go.mod h1:zLqdD2kBX7NsntBneclb2yrHhjFaJdoyA8dK5eimlrE= -github.com/smartcontractkit/chainlink-ccip/chains/evm v0.0.0-20260415165642-49f23e4d76cc h1:dP1ERzdTbiJbHVXfHYdBAi1+8NjgkyQuY2oFNWWWDsQ= -github.com/smartcontractkit/chainlink-ccip/chains/evm v0.0.0-20260415165642-49f23e4d76cc/go.mod h1:7XR5wfgT8hjSsiV+t0EAWvna+rYQeMPaoZf/0g+dios= +github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20260428205619-2db1389501a1 h1:p0nFrTYrOQzDhWYm6suaM5CoWiXV5NV7llHnp6/Kn/8= +github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20260428205619-2db1389501a1/go.mod h1:1XxxpkgCmG/z6y30yRuVrcxre6zixIVX3xzi706Db/8= +github.com/smartcontractkit/chainlink-ccip/ccv/chains/evm v0.0.0-20260408145530-22e2d05695cd h1:Jtw6p5iisjXZyFOcBvWh6PDQKtvryrRU2JMmezdutjo= +github.com/smartcontractkit/chainlink-ccip/ccv/chains/evm v0.0.0-20260408145530-22e2d05695cd/go.mod h1:zLqdD2kBX7NsntBneclb2yrHhjFaJdoyA8dK5eimlrE= +github.com/smartcontractkit/chainlink-ccip/chains/evm v0.0.0-20260428205619-2db1389501a1 h1:wfiut4oWMcpJmTEl/1ShwMBxwTQEv0wV4/YTma9Otxk= +github.com/smartcontractkit/chainlink-ccip/chains/evm v0.0.0-20260428205619-2db1389501a1/go.mod h1:hrNuLHgDa2f47WVO6+KgSxM1/SI1M8npQnaiv4kw3xo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260415165642-49f23e4d76cc h1:mvobZx5JV5PhG/9IXPReV+8mAGnupl0HIWQZ43zxzd4= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260415165642-49f23e4d76cc/go.mod h1:gzCVLUlNov/zFXSC7G6zcGkZU1IfNOHaakbAPDe5Woc= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260415165642-49f23e4d76cc h1:War93neyFmv7pzuElZeZC3qc/OfGtLvEXvqL3qeBfM0= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260415165642-49f23e4d76cc/go.mod h1:67YbnoglYD61Pz/jTVCgav9wFq7S35OU8UyQSvPllRw= -github.com/smartcontractkit/chainlink-ccv v0.0.0-20260408181529-b5080e662563 h1:1sYQ2lG3zbAG2vASNF5kLke8DhGk5lNaJirwPDx3Vi4= -github.com/smartcontractkit/chainlink-ccv v0.0.0-20260408181529-b5080e662563/go.mod h1:nEuyjUh4wrK6mNXEAaOncl/AhCl31oaxOS160gNW0vc= -github.com/smartcontractkit/chainlink-common v0.11.2-0.20260421191147-d10b9943ac71 h1:WSNUds78NMlwDttROK/hJZ6ZOremyrR5JXJmPlT8hO8= -github.com/smartcontractkit/chainlink-common v0.11.2-0.20260421191147-d10b9943ac71/go.mod h1:kOIIjzxuRXK31j1JdZgUAGjqbGwmJ5gU5qI+FMkP6/I= -github.com/smartcontractkit/chainlink-common/keystore v1.0.2 h1:AWisx4JT3QV8tcgh6J5NCrex+wAgTYpWyHsyNPSXzsQ= -github.com/smartcontractkit/chainlink-common/keystore v1.0.2/go.mod h1:rSkIHdomyak3YnUtXLenl6poIq8q0V3UZPiiyYqPdGA= +github.com/smartcontractkit/chainlink-ccv v0.0.2-0.20260428133800-3b1484e8b1fd h1:IMopuENFVS63AerRELdfWo6o60UNUidcldJOxJLmk24= +github.com/smartcontractkit/chainlink-ccv v0.0.2-0.20260428133800-3b1484e8b1fd/go.mod h1:SBN8Urnh5sQvrQRbSo1Nr8coWatHg8LZoPw3R/42sho= +github.com/smartcontractkit/chainlink-common v0.11.2-0.20260505124104-72181f5345ce h1:eoeTZYsKKgU8DaNm92p56bC8PQ1fjZCRyWzBko/hZdY= +github.com/smartcontractkit/chainlink-common v0.11.2-0.20260505124104-72181f5345ce/go.mod h1:G2AII0QmWzXx8Ag9IKnGN3h/gwwNnhHUOCviJievdvo= +github.com/smartcontractkit/chainlink-common/keystore v1.1.0 h1:2wzySccgk2fpWusPKO0bpeAZzfSU9eq6CS5U+JwYaVo= +github.com/smartcontractkit/chainlink-common/keystore v1.1.0/go.mod h1:6JexOOhPhknQ0QMuppFIlOpm6wCp54yZMxai+tWugwY= 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-20251215152504-b1e41f508340 h1:PsjEI+5jZIz9AS4eOsLS5VpSWJINf38clXV3wryPyMk= github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20251215152504-b1e41f508340/go.mod h1:P/0OSXUlFaxxD4B/P6HWbxYtIRmmWGDJAvanq19879c= -github.com/smartcontractkit/chainlink-data-streams v0.1.13 h1:YOmt545DW6U0SyaqBf+NTGDLm1yMurVI7yOvxP5hlJk= -github.com/smartcontractkit/chainlink-data-streams v0.1.13/go.mod h1:00aL7OK0BJdF9gn/4t4f/pctUu2VLwwfA8G/tl9rCrM= -github.com/smartcontractkit/chainlink-deployments-framework v0.95.0 h1:PHncc++Xk9OIP7JDiCvpqdMdP85YZWKQCpnRR7l477g= -github.com/smartcontractkit/chainlink-deployments-framework v0.95.0/go.mod h1:pTA1JrdlMSfb9WkrIfphq2KV/+paW7GHf15Oc/uJBxs= -github.com/smartcontractkit/chainlink-evm v0.3.4-0.20260416173445-80f6efde0a03 h1:z+Au1CpZhVYpn7mkmG/mYFBFkdZoqibQ3LngEHm8Fqs= -github.com/smartcontractkit/chainlink-evm v0.3.4-0.20260416173445-80f6efde0a03/go.mod h1:6vCMfxz7cMW0wWseNKtct+b1JJbbRVJJhh/t6pQWN3M= +github.com/smartcontractkit/chainlink-data-streams v0.1.14-0.20260504075031-e5aae8c82e91 h1:s8E4EYRKEjghJFDnIWQxw8zoCvORVolIY/EKZ+JmzRc= +github.com/smartcontractkit/chainlink-data-streams v0.1.14-0.20260504075031-e5aae8c82e91/go.mod h1:Fl6b/I5qn5TcEh85FP1rNsJ7stcYtmXhVbM2W5RuzQg= +github.com/smartcontractkit/chainlink-deployments-framework v0.96.0 h1:dwdKdXGDfzIwg1/PxQ3YxaeaFplyOtL+EPGtFPVGRmM= +github.com/smartcontractkit/chainlink-deployments-framework v0.96.0/go.mod h1:vjdYbQDNUd3IznXuxv5Gm7VZB804TKOqjNo1BhFOUDk= +github.com/smartcontractkit/chainlink-evm v0.3.4-0.20260504070828-3216bb63d886 h1:ighx6Wf5Le/tp2nFIipnr3axk+zlmu6SZ6n7qp2mpqQ= +github.com/smartcontractkit/chainlink-evm v0.3.4-0.20260504070828-3216bb63d886/go.mod h1:GH17WWRgGTWHp4GfJbK/9LdgkajYuLx1TmAO/jqRKDs= github.com/smartcontractkit/chainlink-evm/contracts/cre/gobindings v0.0.0-20260403151002-2c91155b5501 h1:QJiXTG9CmaQAuMRn5JGi+Jhji7fSkehVnKpjc8oNJJY= github.com/smartcontractkit/chainlink-evm/contracts/cre/gobindings v0.0.0-20260403151002-2c91155b5501/go.mod h1:4cT1BeNF8DAn6In9zr3LayVCv1KzFeuxT7zcuNkfIb0= github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20260119171452-39c98c3b33cd h1:sK+pK4epQp20yQ7XztwrVgkTkRAr4FY+TvEegW8RuQk= github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20260119171452-39c98c3b33cd/go.mod h1:7Jlt72+V9891y3LnGwHzmQwt9tfEGYryRKiGlQHo/o8= 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-20260326122810-b657beadfb57 h1:sCrr1Oy/JZstf/Oi2cRuU4mDN1BRUKfXP2CKByCMADg= -github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20260326122810-b657beadfb57/go.mod h1:kGprqyjsz6qFNVszOQoHc24wfvCjyipNZFste/3zcbs= -github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20260410144512-ca02ad6ed16a h1:QbP7JIzDNvgmGL9TLM5VdzvCA90Ncg7E0ommuodKzEc= -github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20260410144512-ca02ad6ed16a/go.mod h1:HG/aei0MgBOpsyRLexdKGtOUO8yjSJO3iUu0Uu8KBm4= -github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20260410144512-ca02ad6ed16a h1:PsFckZp3Dhb5pVc0Xccj1lvnOEg0H3eQdjtZgnCKd+4= -github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20260410144512-ca02ad6ed16a/go.mod h1:7ketk4ischPQW/JQgmyHz6zdzLUJv1VC29SiSgosydQ= +github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-20260423135514-5b1a7565a99c h1:AYRSQarVw1EJXUrGvHSwmRTtNHHww/i3xwLat5CshUE= +github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-20260423135514-5b1a7565a99c/go.mod h1:HcwehCao5k5C2NGuKJUVoX/AYtoH6njGFiV44dBOcY4= +github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20260423135514-5b1a7565a99c h1:0c+bCKo47vy/ItRtGa3S/vCpE5LRlgXpGnVKQX8TgjE= +github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20260423135514-5b1a7565a99c/go.mod h1:kGprqyjsz6qFNVszOQoHc24wfvCjyipNZFste/3zcbs= +github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20260423135514-5b1a7565a99c h1:1VVreRcffo3N3zF1JVtgS+YC4puuj3y0FU0Fta7L3U0= +github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20260423135514-5b1a7565a99c/go.mod h1:HG/aei0MgBOpsyRLexdKGtOUO8yjSJO3iUu0Uu8KBm4= +github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20260423135514-5b1a7565a99c h1:N5cZI93lPH0oYnVSP9dq72QwKnrW0gBpEmx2MI1ermg= +github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20260423135514-5b1a7565a99c/go.mod h1:7ketk4ischPQW/JQgmyHz6zdzLUJv1VC29SiSgosydQ= 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= @@ -1361,14 +1361,14 @@ github.com/smartcontractkit/chainlink-protos/chainlink-ccv/message-discovery v0. 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-20260420204255-a3f3bdd56877 h1:6UueUIbck1Ogarm9rm/9TS6b09mKgMmx+YE8XFg63AQ= -github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260420204255-a3f3bdd56877/go.mod h1:Jqt53s27Tr0jDl8mdBXg1xhu6F8Fci8JOuq43tgHOM8= +github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260511222622-3dae6143f38a h1:WqCdxqmZIRoen4Cu/4lIiqPwMF3rBCkOYLQ6SdjCCfM= +github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260511222622-3dae6143f38a/go.mod h1:Jqt53s27Tr0jDl8mdBXg1xhu6F8Fci8JOuq43tgHOM8= github.com/smartcontractkit/chainlink-protos/job-distributor v0.18.0 h1:q+VDPcxWrj5k9QizSYfUOSMnDH3Sd5HvbPguZOgfXTY= github.com/smartcontractkit/chainlink-protos/job-distributor v0.18.0/go.mod h1:/dVVLXrsp+V0AbcYGJo3XMzKg3CkELsweA/TTopCsKE= github.com/smartcontractkit/chainlink-protos/linking-service/go v0.0.0-20251002192024-d2ad9222409b h1:QuI6SmQFK/zyUlVWEf0GMkiUYBPY4lssn26nKSd/bOM= github.com/smartcontractkit/chainlink-protos/linking-service/go v0.0.0-20251002192024-d2ad9222409b/go.mod h1:qSTSwX3cBP3FKQwQacdjArqv0g6QnukjV4XuzO6UyoY= -github.com/smartcontractkit/chainlink-protos/node-platform v0.0.0-20260319180422-b5808c964785 h1:oli+2uLU6jcrJGCuYFqk3475hiwL17SWlITWLv+tx/w= -github.com/smartcontractkit/chainlink-protos/node-platform v0.0.0-20260319180422-b5808c964785/go.mod h1:dkR2uYg9XYJuT1JASkPzWE51jjFkVb86P7a/yXe5/GM= +github.com/smartcontractkit/chainlink-protos/node-platform v0.0.0-20260430172634-acccf17ece83 h1:yBSCSnJDMx7MCU0bGy6v1XK4CoP9Q7VZjjrIst4Q7rE= +github.com/smartcontractkit/chainlink-protos/node-platform v0.0.0-20260430172634-acccf17ece83/go.mod h1:dkR2uYg9XYJuT1JASkPzWE51jjFkVb86P7a/yXe5/GM= github.com/smartcontractkit/chainlink-protos/op-catalog v0.0.4 h1:AEnxv4HM3WD1RbQkRiFyb9cJ6YKAcqBp1CpIcFdZfuo= github.com/smartcontractkit/chainlink-protos/op-catalog v0.0.4/go.mod h1:PjZD54vr6rIKEKQj6HNA4hllvYI/QpT+Zefj3tqkFAs= github.com/smartcontractkit/chainlink-protos/orchestrator v0.10.0 h1:0eroOyBwmdoGUwUdvMI0/J7m5wuzNnJDMglSOK1sfNY= @@ -1379,32 +1379,32 @@ github.com/smartcontractkit/chainlink-protos/rmn/v1.6/go v0.0.0-20250131130834-1 github.com/smartcontractkit/chainlink-protos/rmn/v1.6/go v0.0.0-20250131130834-15e0d4cde2a6/go.mod h1:FRwzI3hGj4CJclNS733gfcffmqQ62ONCkbGi49s658w= github.com/smartcontractkit/chainlink-protos/storage-service v0.3.0 h1:B7itmjy+CMJ26elVw/cAJqqhBQ3Xa/mBYWK0/rQ5MuI= github.com/smartcontractkit/chainlink-protos/storage-service v0.3.0/go.mod h1:h6kqaGajbNRrezm56zhx03p0mVmmA2xxj7E/M4ytLUA= -github.com/smartcontractkit/chainlink-protos/svr v1.1.1-0.20260203131522-bb8bc5c423b3 h1:X8Pekpv+cy0eW1laZTwATuYLTLZ6gRTxz1ZWOMtU74o= -github.com/smartcontractkit/chainlink-protos/svr v1.1.1-0.20260203131522-bb8bc5c423b3/go.mod h1:TcOliTQU6r59DwG4lo3U+mFM9WWyBHGuFkkxQpvSujo= +github.com/smartcontractkit/chainlink-protos/svr v1.2.0 h1:7jjgqRgORQS/ikL3z0ZgJy95pzjhR9LuU1TVWg4BZ78= +github.com/smartcontractkit/chainlink-protos/svr v1.2.0/go.mod h1:TcOliTQU6r59DwG4lo3U+mFM9WWyBHGuFkkxQpvSujo= github.com/smartcontractkit/chainlink-protos/workflows/go v0.0.0-20260323124644-faea187e6997 h1:W0HKHO8eE8BckTRnhSdqjHKbJcnk068nEWYnWRu6tJY= github.com/smartcontractkit/chainlink-protos/workflows/go v0.0.0-20260323124644-faea187e6997/go.mod h1:GTpDgyK0OObf7jpch6p8N281KxN92wbB8serZhU9yRc= -github.com/smartcontractkit/chainlink-solana v1.1.2-0.20260421131224-c46cbfe7bc6c h1:2ZdBZCZWKUMOWLtReaBBHkmDtXc0WtwcqIROHAcm3j4= -github.com/smartcontractkit/chainlink-solana v1.1.2-0.20260421131224-c46cbfe7bc6c/go.mod h1:sUsEwLtVPBlz0wPcysaolS+HVj9cOAt4jYhwE6J8dXg= -github.com/smartcontractkit/chainlink-sui v0.0.0-20260409184948-5b16fae57fe0 h1:nmuT5gKyTHpsHBEJMDM1C+v1d8jR/N8Xfg3KvqJUm8U= -github.com/smartcontractkit/chainlink-sui v0.0.0-20260409184948-5b16fae57fe0/go.mod h1:YQDu2RcdoAzI5xlhtpbjvaQQZwkUt/Q+IhLbP25M614= +github.com/smartcontractkit/chainlink-solana v1.1.2-0.20260428170719-7ad4e58aaacf h1:GyBD65Cc4HuwRKZ6k4UCtFaG7njGTnZyR+z3VPm3Vyo= +github.com/smartcontractkit/chainlink-solana v1.1.2-0.20260428170719-7ad4e58aaacf/go.mod h1:sUsEwLtVPBlz0wPcysaolS+HVj9cOAt4jYhwE6J8dXg= +github.com/smartcontractkit/chainlink-sui v0.0.0-20260427132612-76b9f754a556 h1:Nz70a+A7aNnWRYdLpGdUf8NeauMvZFOBEPfZTm8vxwI= +github.com/smartcontractkit/chainlink-sui v0.0.0-20260427132612-76b9f754a556/go.mod h1:xJ1UT4DKu1znbsm4ehkrfr92rgn8Hxgcp3Z9rgfXRjM= github.com/smartcontractkit/chainlink-testing-framework/framework v0.15.16 h1:pzrAgF6QFMQLS/kukXenLN87PCa48SEMlE7QvJxTOHs= github.com/smartcontractkit/chainlink-testing-framework/framework v0.15.16/go.mod h1:BALK9cj8sk12e15UF6uDhifHgIApa+6N11TcQfInEro= github.com/smartcontractkit/chainlink-testing-framework/seth v1.51.5 h1:RwZXxdIAOyjp6cwc9Quxgr38k8r7ACz+Lxh9o/A6oH0= github.com/smartcontractkit/chainlink-testing-framework/seth v1.51.5/go.mod h1:kHYJnZUqiPF7/xN5273prV+srrLJkS77GbBXHLKQpx0= -github.com/smartcontractkit/chainlink-ton v0.0.0-20260415120434-cecc380f8d87 h1:NgA2+Q0wfHicP/QeY1hgULQ1ZBk1sgBpOJi3GpxfjE8= -github.com/smartcontractkit/chainlink-ton v0.0.0-20260415120434-cecc380f8d87/go.mod h1:UmQdvE8BtbLdoOFY0+Adqoc7HT1Hd1bbFY/yymuM0NU= +github.com/smartcontractkit/chainlink-ton v0.0.0-20260423161209-5ce1dba9785e h1:hoHL/UDtmasVzu78vwCkfLhDktqjPEhRK7DN58fnn1U= +github.com/smartcontractkit/chainlink-ton v0.0.0-20260423161209-5ce1dba9785e/go.mod h1:ueY5pFIW//gVJS8/rh8qIs2gdlntxfAiOZfBSvJRjXk= github.com/smartcontractkit/chainlink-tron/relayer v0.0.11-0.20260408092456-3c6369888d4a h1:Xu8iBnBQEibWIXTCwKYf8okXjFtzJ0KochjL03h+T40= github.com/smartcontractkit/chainlink-tron/relayer v0.0.11-0.20260408092456-3c6369888d4a/go.mod h1:1eaXR+Fe6TlpP+CKXozfYlFM8QgN/N5C7OMvTRWNT8I= github.com/smartcontractkit/chainlink-tron/relayer/gotron-sdk v0.0.5-0.20251014143056-a0c6328c91e9 h1:/Q1gD5gI0glBMztVH9XUVci3aOy8h+qTDV6o42MsqMM= github.com/smartcontractkit/chainlink-tron/relayer/gotron-sdk v0.0.5-0.20251014143056-a0c6328c91e9/go.mod h1:ea1LESxlSSOgc2zZBqf1RTkXTMthHaspdqUHd7W4lF0= github.com/smartcontractkit/chainlink/deployment v0.0.0-20260422181348-efa818697ce5 h1:5Vh1ulQMReXwg8qgT5by12MqJt+Dc9y3Y/df02QeLuk= github.com/smartcontractkit/chainlink/deployment v0.0.0-20260422181348-efa818697ce5/go.mod h1:pMBypeRoT8Nnb5gbkW6kIs+fBVsc/OzUx2eR9MtyFaw= -github.com/smartcontractkit/chainlink/v2 v2.29.1-cre-beta.0.0.20260422181348-efa818697ce5 h1:G2TvBxwvzLMIU5hMPsQlVAY027mT1P/VTiWA6yegmpM= -github.com/smartcontractkit/chainlink/v2 v2.29.1-cre-beta.0.0.20260422181348-efa818697ce5/go.mod h1:8/a/Nlo4ZndgBEumXoE+gvBA5LH40BfDM+6SZa4Q89M= -github.com/smartcontractkit/cre-sdk-go v1.7.0 h1:MtaJ4jXS/5RcRCrjoza52/g3c0qrGXGB3V5yO9l6tUA= -github.com/smartcontractkit/cre-sdk-go v1.7.0/go.mod h1:yYrQFz1UH7hhRbPO0q4fgo1tfsJNd4yXnI3oCZE0RzM= -github.com/smartcontractkit/cre-sdk-go/capabilities/blockchain/evm v1.0.0-beta.9 h1:UORlnFd/BNjSX9MjUDjSg7/awWwgXqS+BdWOnyEIqWk= -github.com/smartcontractkit/cre-sdk-go/capabilities/blockchain/evm v1.0.0-beta.9/go.mod h1:M4EQIX5V66V7wKyDBa/8L3JLFf/m0FNmGDvjIqKPqSw= +github.com/smartcontractkit/chainlink/v2 v2.46.0 h1:CeILLkUl64Mh39WHe5SmPDw8Fldu8BYI4rJWjveYnuw= +github.com/smartcontractkit/chainlink/v2 v2.46.0/go.mod h1:gNJE4C5BxtRggz+EY1B1DbURmRtB9pjHR/q5MttjFlc= +github.com/smartcontractkit/cre-sdk-go v1.5.0 h1:kepW3QDKARrOOHjXwWAZ9j5KLk6bxLzvi6OMrLsFwVo= +github.com/smartcontractkit/cre-sdk-go v1.5.0/go.mod h1:yYrQFz1UH7hhRbPO0q4fgo1tfsJNd4yXnI3oCZE0RzM= +github.com/smartcontractkit/cre-sdk-go/capabilities/blockchain/evm v1.0.0-beta.6.0.20260330204130-964a5b106d0c h1:UUhjBBOiJLp6ZiEqRprPBdvAX2IZApwKYEYgthAv0fA= +github.com/smartcontractkit/cre-sdk-go/capabilities/blockchain/evm v1.0.0-beta.6.0.20260330204130-964a5b106d0c/go.mod h1:DAC99+IO2/7v1osIUqo7ggpJb2dSGP2PCKcJ/CNdDtg= github.com/smartcontractkit/freeport v0.1.3-0.20250828155247-add56fa28aad h1:lgHxTHuzJIF3Vj6LSMOnjhqKgRqYW+0MV2SExtCYL1Q= github.com/smartcontractkit/freeport v0.1.3-0.20250828155247-add56fa28aad/go.mod h1:T4zH9R8R8lVWKfU7tUvYz2o2jMv1OpGCdpY2j2QZXzU= github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 h1:12ijqMM9tvYVEm+nR826WsrNi6zCKpwBhuApq127wHs= @@ -1676,8 +1676,8 @@ go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.14.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= -go.uber.org/zap v1.27.1 h1:08RqriUEv8+ArZRYSTXy1LeBScaMpVSTBhCeaZYfMYc= -go.uber.org/zap v1.27.1/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +go.uber.org/zap v1.28.0 h1:IZzaP1Fv73/T/pBMLk4VutPl36uNC+OSUh3JLG3FIjo= +go.uber.org/zap v1.28.0/go.mod h1:rDLpOi171uODNm/mxFcuYWxDsqWSAVkFdX4XojSKg/Q= go.yaml.in/yaml/v2 v2.4.4 h1:tuyd0P+2Ont/d6e2rl3be67goVK4R6deVxCUX5vyPaQ= go.yaml.in/yaml/v2 v2.4.4/go.mod h1:gMZqIpDtDqOfM0uNfy0SkpRhvUryYH0Z6wdMYcacYXQ= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= @@ -1709,8 +1709,8 @@ golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98y golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.20.0/go.mod h1:Xwo95rrVNIoSMx9wa1JroENMToLWn3RNVrTBpLHgZPQ= -golang.org/x/crypto v0.49.0 h1:+Ng2ULVvLHnJ/ZFEq4KdcDd/cfjrrjjNSXNzxg0Y4U4= -golang.org/x/crypto v0.49.0/go.mod h1:ErX4dUh2UM+CFYiXZRTcMpEcN8b/1gxEuv3nODoYtCA= +golang.org/x/crypto v0.50.0 h1:zO47/JPrL6vsNkINmLoo/PH1gcxpls50DNogFvB5ZGI= +golang.org/x/crypto v0.50.0/go.mod h1:3muZ7vA7PBCE6xgPX7nkzzjiUq87kRItoJQM1Yo8S+Q= 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= @@ -1747,8 +1747,8 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 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.33.0 h1:tHFzIWbBifEmbwtGz65eaWyGiGZatSrT9prnU8DbVL8= -golang.org/x/mod v0.33.0/go.mod h1:swjeQEj+6r7fODbD2cqrnje9PnziFuw4bmLbBZFrQ5w= +golang.org/x/mod v0.34.0 h1:xIHgNUUnW6sYkcM5Jleh05DvLOtwc6RitGHbDk4akRI= +golang.org/x/mod v0.34.0/go.mod h1:ykgH52iCZe79kzLLMhyCUzhMci+nQj+0XkbXpNYtVjY= 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= @@ -1897,10 +1897,10 @@ 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.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo= -golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= -golang.org/x/telemetry v0.0.0-20260209163413-e7419c687ee4 h1:bTLqdHv7xrGlFbvf5/TXNxy/iUwwdkjhqQTJDjW7aj0= -golang.org/x/telemetry v0.0.0-20260209163413-e7419c687ee4/go.mod h1:g5NllXBEermZrmR51cJDQxmJUHUOfRAaNyWBM+R+548= +golang.org/x/sys v0.43.0 h1:Rlag2XtaFTxp19wS8MXlJwTvoh8ArU6ezoyFsMyCTNI= +golang.org/x/sys v0.43.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= +golang.org/x/telemetry v0.0.0-20260311193753-579e4da9a98c h1:6a8FdnNk6bTXBjR4AGKFgUKuo+7GnR3FX5L7CbveeZc= +golang.org/x/telemetry v0.0.0-20260311193753-579e4da9a98c/go.mod h1:TpUTTEp9frx7rTdLpC9gFG9kdI7zVLFTFFlqaH2Cncw= 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-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -1911,8 +1911,8 @@ golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= -golang.org/x/term v0.41.0 h1:QCgPso/Q3RTJx2Th4bDLqML4W6iJiaXFq2/ftQF13YU= -golang.org/x/term v0.41.0/go.mod h1:3pfBgksrReYfZ5lvYM0kSO0LIkAl4Yl2bXOkKP7Ec2A= +golang.org/x/term v0.42.0 h1:UiKe+zDFmJobeJ5ggPwOshJIVt6/Ft0rcfrXZDLWAWY= +golang.org/x/term v0.42.0/go.mod h1:Dq/D+snpsbazcBG5+F9Q1n2rXV8Ma+71xEjTRufARgY= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1926,8 +1926,8 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.35.0 h1:JOVx6vVDFokkpaq1AEptVzLTpDe9KGpj5tR4/X+ybL8= -golang.org/x/text v0.35.0/go.mod h1:khi/HExzZJ2pGnjenulevKNX1W67CUy0AsXcNubPGCA= +golang.org/x/text v0.36.0 h1:JfKh3XmcRPqZPKevfXVpI1wXPTqbkE5f7JA92a55Yxg= +golang.org/x/text v0.36.0/go.mod h1:NIdBknypM8iqVmPiuco0Dh6P5Jcdk8lJL0CUebqK164= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1980,8 +1980,8 @@ golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= 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.42.0 h1:uNgphsn75Tdz5Ji2q36v/nsFSfR/9BRFvqhGBaJGd5k= -golang.org/x/tools v0.42.0/go.mod h1:Ma6lCIwGZvHK6XtgbswSoWroEkhugApmsXyrUmBhfr0= +golang.org/x/tools v0.43.0 h1:12BdW9CeB3Z+J/I/wj34VMl8X+fEXBxVR90JeMX5E7s= +golang.org/x/tools v0.43.0/go.mod h1:uHkMso649BX2cZK6+RpuIPXS3ho2hZo4FVwfoy1vIk0= 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= From 931827fcc7d320bed7b1a298de2d1a9e0456b63f Mon Sep 17 00:00:00 2001 From: Yashvardhan Nevatia Date: Tue, 12 May 2026 11:22:56 +0100 Subject: [PATCH 2/9] Add Aptos Simulate to cap dev (#423) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(simulate): Aptos chain family for `cre workflow simulate` Wires an Aptos chain type into `cre workflow simulate` so workflows targeting `aptos:ChainSelector:N@1.0.0` can be exercised locally against testnet RPCs + a user-published mock forwarder. chain/aptos plugin: - chaintype.go — registers `aptos` via chain.Register; implements ChainType (Name, SupportedChains, ResolveClients, ResolveKey, RegisterCapabilities, RunHealthCheck, ParseTriggerChainSelector, etc.). No trigger surface on Aptos. - capabilities.go — AptosChainCapabilities wires FakeAptosChain per selector and registers with the capability registry. - limited_capabilities.go — LimitedAptosChain enforces chain-write size + Aptos MaxGasAmount via caperrors.ResourceExhausted. - supported_chains.go — mainnet + testnet selectors. - health.go — RunRPCHealthCheck probes GetChainId per client. chain/evm refactor: extracts the EVM-specific pieces out of simulate.go so the simulate command delegates per-chain work through a chain-type registry (EVM + Aptos siblings). Trigger handling, registry, types, utils moved to chain/*. evm/trigger.go carries manual-log-trigger glue. Settings + limits: - CRE_APTOS_PRIVATE_KEY plumbing (Ed25519 hex seed); sentinel seed allowed non-broadcast with ui.Warning; hard-fail under --broadcast for unparseable or sentinel key. - ChainWriteAptosMaxGasAmount in SimulationLimits. Tests: - Unit: chaintype / capabilities / limited / supported_chains / health. - 30-scenario CLI end-to-end suite (simulator_scenarios_test.go). - test/aptos_cli_scenarios_test.go integration. - test_project/aptos_smoke/ example workflow for manual smoke. PLEX-2751 * test(simulate/aptos): extend scenarios from 30 to 100 Broadens TestSimulatorScenarios_100 to cover the full behavioural surface of the Aptos chain plugin + FakeAptosChain: - 31-45: AptosChainType surface (Name, SupportedChains, HasSelector, ParseTriggerChainSelector, ExecuteTrigger/ResolveTriggerData stubs, ResolveKey hex/0x/uppercase/whitespace/short-seed rejections). - 46-52: RegisterCapabilities rejects wrong client, key, and limits types; accepts unknown (experimental) selectors; skips selectors without forwarders; surfaces bad forwarder hex; interface assert. - 53-62: View TypeTag coverage — BOOL, U8, U16, U32, U64, U128, U256, ADDRESS round-trips; SIGNER and VECTOR rejected. - 63-72: read-path edges — all-zero/all-ones addresses, empty result, multi-return, integer return, SDK timeout, nil pagination, nil-entry drop, nil request validation. - 73-82: WriteReport broadcast paths — SUCCESS, VM failure, nil pending, forwarder error, WaitForTransaction error, nil-final fallback, multi-sig, empty sigs, 64KiB report, zero gas accepted. - 83-90: LimitedAptosChain — exact/over/under size and gas limits, zero-limit disables check, View/TransactionByHash delegation. - 91-100: lifecycle + info — ChainSelector, Description, Info ID format, Name embedding, Initialise/Register/Unregister/Execute no-ops, HealthReport shape, AptosChainCapabilities Start/Close, constructor nil guards. PLEX-2751 * build(deps): pin chainlink-aptos to PLEX-2751 PR head Drops the local `replace ../chainlink-aptos` directive (breaks CI sibling-dir lookup) and pins chainlink-aptos to the PLEX-2751 feature-branch pseudo-version v0.0.0-20260421125752-47d9d126c005 so unit, tidy, gendoc, and e2e jobs can resolve the `fakes` import. Will be re-pinned to the merged SHA once smartcontractkit/chainlink-aptos#442 lands on develop. PLEX-2751 * test(cli): extend aptos CLI scenarios from 30 to 100 Broadens the e2e cre-binary suite (gated by CRE_APTOS_CLI_E2E=1) with 70 additional scenarios covering: - 31-40: balance fan-out across address shapes (high bit, low bit, max_u256, fan-out lanes). - 41-50: view coin::balance edges (all-zero, all-0x01, all-0xff, canonical aligned-byte addresses). - 51-60: tx-by-hash randomised nonexistent hashes (routing proof). - 61-70: account-transactions fan-out. - 71-80: wrong selector / experimental-chain rejection (EVM mainnet, Solana, 0, 1, max uint64, Aptos mainnet without wiring, experimental 99999999 for each read op, baseline testnet selector unchanged). - 81-90: UI + flag variations (--limits none/default, --help global and workflow simulate scoped, missing wasm/config error messages, invalid --trigger-index, empty CRE_TARGET env). - 91-100: broadcast + key edge cases (--broadcast with sentinel / unparseable / short-hex keys — all must hard-fail with CRE_APTOS_PRIVATE_KEY in the error message, dry-run sentinel warning, dry-run with valid key success, follow-up routing regression cases). Runner rewritten to handle three scenario shapes: - standard simulator dry-run (config + args), - help/no-config invocations (skip simulator markers), - mustFail scenarios (process exit non-zero, expect substring in combined output). Scenario padding widened to %03d to fit 100 cases. PLEX-2751 * chore(simulate/aptos): address audit feedback - ResolveKey: split hex-decode vs length-mismatch errors; align wording with EVM's CRE_*_PRIVATE_KEY message. - ParseTriggerChainSelector: strict prefix+suffix+ParseUint, rejects trailing garbage after @1.0.0. - --broadcast flag help: chain-agnostic wording (no longer EVM-only). - LimitsSummary: include Aptos gas limit alongside EVM; test updated. - aptos_cli_scenarios_test: use t.TempDir() for per-subtest config paths instead of /tmp/apcfg_%03d.json. * test(aptos): use /tmp for config path to satisfy 97-char limit TempDir() paths exceed ConfigPath validation (max=97) on macOS. Restore /tmp/apcfg_NNN.json with defer os.Remove; add APTOS_SMOKE_WASM env override for WASM location. * feat(simulate/aptos): support experimental-chains + align view test expectations - Add chain-type discriminator to ExperimentalChain; empty defaults to evm - Aptos ResolveClients picks up chain-type: aptos entries - EVM skips non-evm experimental entries - Use corekeys.Aptos / ct.Name() for chain-type strings - Update project.yaml.tpl example - Align View/WriteReport test assertions with pinned FakeAptosChain semantics * refactor(settings): consolidate chain signing keys behind ChainType (#399) Replace EthPrivateKey / AptosPrivateKey fields on UserSettings with a single PrivateKeys map keyed by ChainType.Name, and introduce a ChainType struct that bundles each family's name + signing-key env var. Names are derived from corekeys.EVM / corekeys.Aptos so the canonical upstream identifiers are the single source of truth. Adding a new chain family is now one entry in AllChainTypes instead of a new field, constant, and loader branch. Remove unused EthUrl and simplify the project.yaml experimental-chains example comment. * refactor(settings): dispatch chain name lookup by family prefix chain-selectors has no AptosChainIdFromName; previous fallback scanned the Aptos map with a double lookup. Switch on FamilyAptos prefix and iterate AptosALL directly, reading Name/Selector off the struct. * chore(test): untrack local-only Aptos smoke scaffolding Remove aptos_cli_scenarios_test.go and test/test_project/aptos_smoke/ from version control and ignore them going forward. Files remain on disk for local iteration. * refactor(simulate): centralize chain limits, untrack local Aptos scenarios Move per-family Limits struct definition into chain package as the shared type used by EVM and Aptos plugin wrappers. Each plugin keeps its own ExtractLimits to populate the struct from cresettings.Workflows. Aptos's GasLimit field maps to max_gas_amount. Untrack local Aptos simulator_scenarios_test.go (kept on disk via .gitignore) — these scenarios are local-only smoke fixtures. * refactor(simulate): per-family ChainWrite limits and engine cfg parity Move ReportSizeLimit and gas defaults into per-family EVM/Aptos blocks in limits.json (upstream top-level ChainWrite.ReportSizeLimit is deprecated). Split ChainWriteReportSizeLimit() getter into EVM/AptosChainWriteReportSizeLimit(), update LimitsSummary to render evm_report/evm_gas/aptos_report/aptos_gas, and read per-family fields in chain/{evm,aptos}/limits.go. Apply ChainWrite.{EVM,Aptos} report+gas to engine cfg in both applyEngineLimits and disableEngineLimits for symmetry and future hardening (current sim enforcement runs via Limited{EVM,Aptos}Chain wrappers reading SimulationLimits directly). Drop deprecated EVM.TransactionGasLimit. Tighten broadcast/ChainType doc comments. * test(simulate): add per-family gas-limit getters and assertions Mirror the per-family ReportSize getters with EVMChainWriteGasLimit and AptosChainWriteGasLimit. Cover them in default, custom-load, resolve, and applyEngineLimits tests for parity with ReportSize. * test(simulate): drop redundant chain ExtractLimits override tests Override path is covered by simulate/limits_test.go via the EVM/AptosChainWriteGasLimit getters which read the same fields. Keep the default-mapping smoke tests as chain-package unit anchors. * test(simulate/aptos): align supported_chains tests with EVM parity Add selector non-zero/unique, forwarder hex validity (64-hex for Aptos object addresses), selector family resolution, no-empty-forwarder, and SupportedChains() return-parity tests. Keep existing mainnet/testnet presence check. * test(simulate): cover zero-limit and nil sub-message passthrough Add parity coverage to LimitedAptosChain and LimitedEVMChain wrappers for the --limits none equivalent (zero chain.Limits delegates oversized input) and nil GasConfig / nil Report inputs (no panic, delegates). * refactor(simulate/aptos): drop dead-defensive nil input guard gRPC server stubs guarantee a non-nil top-level WriteReportRequest, so 'input != nil' was unreachable. Align with the EVM wrapper which only guards on the optional Report and GasConfig sub-messages. * test(simulate/aptos): cover mixed known + experimental health check Mirror EVM TestHealthCheck_MixedKnownAndExperimental: a healthy named selector plus an experimental selector that errors should report the experimental label and omit the healthy one. * test(simulate/aptos): align chaintype coverage with EVM Add parity tests: ResolveTriggerData/ExecuteTrigger return the 'no trigger surface' contract, RegisterCapabilities surfaces wrong client type and constructs empty on no clients, RunHealthCheck propagates invalid client type, init() registers under chain.Names, CollectCLIInputs returns empty. * chore(simulate/aptos): log when experimental forwarder matches supported Mirror EVM's debug log in ResolveClients so the no-override branch is observable; aligns Aptos with the existing EVM behaviour. * refactor(simulate/aptos): delegate ParseTriggerChainSelector to shared helper Use chain.ParseTriggerChainSelector(ct.Name(), triggerID) like EVM, removing the bespoke prefix/suffix parsing and its local test (already covered by chain/trigger_test.go's Aptos cases). * chore(simulate/evm): wrap registry.Add error with selector context Match the Aptos error wrap so capability-registration failures point at the offending chain selector instead of bubbling a bare error. * fix(simulate/aptos): improve Aptos config guidance Clarify Aptos simulator errors and generated environment setup so users get the same remediation cues as EVM without adding extra address normalization. Made-with: Cursor * Reset gitignore * chore: tidy go.sum (drop stale chainlink-aptos entry) Made-with: Cursor * fix(ci): post-merge fixes for ci-test-unit, ci-lint, gendoc - handler_test.go: replace removed UserSettings.EthPrivateKey with PrivateKeys map (test build was failing typecheck) - docs/cre_workflow_simulate.md: regenerate via 'make gendoc' to match updated --broadcast flag help text * fix(lint): gci import grouping in simulate pkg * fix(lint): gci import grouping in simulate/chain/aptos --------- Co-authored-by: Michael Fletcher Co-authored-by: Michael Fletcher <36506122+Fletch153@users.noreply.github.com> --- cmd/secrets/common/handler.go | 6 +- cmd/secrets/common/handler_test.go | 2 +- cmd/workflow/activate/activate_test.go | 6 +- cmd/workflow/delete/delete_test.go | 6 +- cmd/workflow/pause/pause_test.go | 6 +- .../simulate/chain/aptos/capabilities.go | 78 +++++++ .../simulate/chain/aptos/chaintype.go | 195 ++++++++++++++++++ .../simulate/chain/aptos/chaintype_test.go | 165 +++++++++++++++ cmd/workflow/simulate/chain/aptos/health.go | 54 +++++ .../simulate/chain/aptos/health_test.go | 123 +++++++++++ .../chain/aptos/limited_capabilities.go | 70 +++++++ .../chain/aptos/limited_capabilities_test.go | 118 +++++++++++ cmd/workflow/simulate/chain/aptos/limits.go | 14 ++ .../simulate/chain/aptos/limits_test.go | 17 ++ .../simulate/chain/aptos/supported_chains.go | 18 ++ .../chain/aptos/supported_chains_test.go | 82 ++++++++ .../simulate/chain/evm/capabilities.go | 13 +- cmd/workflow/simulate/chain/evm/chaintype.go | 22 +- .../simulate/chain/evm/chaintype_test.go | 15 +- .../chain/evm/limited_capabilities.go | 26 +-- .../chain/evm/limited_capabilities_test.go | 56 ++++- cmd/workflow/simulate/chain/evm/limits.go | 14 ++ .../simulate/chain/evm/limits_test.go | 17 ++ cmd/workflow/simulate/chain/types.go | 18 +- cmd/workflow/simulate/limits.go | 40 +++- cmd/workflow/simulate/limits.json | 10 +- cmd/workflow/simulate/limits_test.go | 39 ++-- cmd/workflow/simulate/simulate.go | 12 +- cmd/workflow/simulate/simulate_test.go | 8 +- docs/cre_workflow_simulate.md | 2 +- go.mod | 4 +- internal/settings/settings.go | 61 ++++-- internal/settings/settings_generate.go | 12 +- internal/settings/settings_generate_test.go | 16 ++ internal/settings/settings_get.go | 31 +-- internal/settings/settings_test.go | 10 +- internal/settings/template/.env.tpl | 3 + internal/settings/template/project.yaml.tpl | 5 +- .../workflow_private_registry.go | 2 +- 39 files changed, 1251 insertions(+), 145 deletions(-) create mode 100644 cmd/workflow/simulate/chain/aptos/capabilities.go create mode 100644 cmd/workflow/simulate/chain/aptos/chaintype.go create mode 100644 cmd/workflow/simulate/chain/aptos/chaintype_test.go create mode 100644 cmd/workflow/simulate/chain/aptos/health.go create mode 100644 cmd/workflow/simulate/chain/aptos/health_test.go create mode 100644 cmd/workflow/simulate/chain/aptos/limited_capabilities.go create mode 100644 cmd/workflow/simulate/chain/aptos/limited_capabilities_test.go create mode 100644 cmd/workflow/simulate/chain/aptos/limits.go create mode 100644 cmd/workflow/simulate/chain/aptos/limits_test.go create mode 100644 cmd/workflow/simulate/chain/aptos/supported_chains.go create mode 100644 cmd/workflow/simulate/chain/aptos/supported_chains_test.go create mode 100644 cmd/workflow/simulate/chain/evm/limits.go create mode 100644 cmd/workflow/simulate/chain/evm/limits_test.go diff --git a/cmd/secrets/common/handler.go b/cmd/secrets/common/handler.go index 9298d4b8..8a7efa2e 100644 --- a/cmd/secrets/common/handler.go +++ b/cmd/secrets/common/handler.go @@ -76,13 +76,13 @@ type Handler struct { func NewHandler(ctx *runtime.Context, secretsFilePath, secretsAuth string) (*Handler, error) { var pk *ecdsa.PrivateKey var err error - if ctx.Settings.User.EthPrivateKey != "" { - pk, err = crypto.HexToECDSA(ctx.Settings.User.EthPrivateKey) + if ethKey := ctx.Settings.User.PrivateKey(settings.EVM); ethKey != "" { + pk, err = crypto.HexToECDSA(ethKey) if err != nil { return nil, fmt.Errorf("failed to decode the provided private key: %w", err) } } else { - ctx.Logger.Debug().Msg("No EthPrivateKey found in settings; assuming a multisig request.") + ctx.Logger.Debug().Msg("No EVM private key found in settings; assuming a multisig request.") } diff --git a/cmd/secrets/common/handler_test.go b/cmd/secrets/common/handler_test.go index 998be9ec..d7d859b2 100644 --- a/cmd/secrets/common/handler_test.go +++ b/cmd/secrets/common/handler_test.go @@ -349,7 +349,7 @@ func TestNewHandler_WorkflowRegistryClient(t *testing.T) { Logger: &logger, ClientFactory: cf, Settings: &settings.Settings{ - User: settings.UserSettings{EthPrivateKey: ""}, + User: settings.UserSettings{PrivateKeys: map[string]string{settings.EVM.Name: ""}}, Workflow: settings.WorkflowSettings{}, }, EnvironmentSet: &environments.EnvironmentSet{GatewayURL: "http://localhost"}, diff --git a/cmd/workflow/activate/activate_test.go b/cmd/workflow/activate/activate_test.go index f94522aa..6aec1bea 100644 --- a/cmd/workflow/activate/activate_test.go +++ b/cmd/workflow/activate/activate_test.go @@ -20,7 +20,7 @@ func TestNonInteractive_WithoutYes_ReturnsError(t *testing.T) { ctx := simulatedEnvironment.NewRuntimeContext() ctx.Settings = &settings.Settings{ User: settings.UserSettings{ - EthPrivateKey: chainsim.TestPrivateKey, + PrivateKeys: map[string]string{settings.EVM.Name: chainsim.TestPrivateKey}, }, } ctx.Settings.Workflow.UserWorkflowSettings.WorkflowOwnerType = constants.WorkflowOwnerTypeEOA @@ -47,7 +47,7 @@ func TestNonInteractive_WithYes_PassesGuard(t *testing.T) { ctx := simulatedEnvironment.NewRuntimeContext() ctx.Settings = &settings.Settings{ User: settings.UserSettings{ - EthPrivateKey: chainsim.TestPrivateKey, + PrivateKeys: map[string]string{settings.EVM.Name: chainsim.TestPrivateKey}, }, } ctx.Settings.Workflow.UserWorkflowSettings.WorkflowOwnerType = constants.WorkflowOwnerTypeEOA @@ -162,7 +162,7 @@ func TestWorkflowActivateCommand(t *testing.T) { ctx := simulatedEnvironment.NewRuntimeContext() ctx.Settings = &settings.Settings{ User: settings.UserSettings{ - EthPrivateKey: chainsim.TestPrivateKey, + PrivateKeys: map[string]string{settings.EVM.Name: chainsim.TestPrivateKey}, }, } ctx.Settings.Workflow.UserWorkflowSettings.WorkflowOwnerType = constants.WorkflowOwnerTypeEOA diff --git a/cmd/workflow/delete/delete_test.go b/cmd/workflow/delete/delete_test.go index 0146c0cf..17bb9a2c 100644 --- a/cmd/workflow/delete/delete_test.go +++ b/cmd/workflow/delete/delete_test.go @@ -21,7 +21,7 @@ func TestNonInteractive_WithoutYes_ReturnsError(t *testing.T) { ctx := simulatedEnvironment.NewRuntimeContext() ctx.Settings = &settings.Settings{ User: settings.UserSettings{ - EthPrivateKey: chainsim.TestPrivateKey, + PrivateKeys: map[string]string{settings.EVM.Name: chainsim.TestPrivateKey}, }, } ctx.Settings.Workflow.UserWorkflowSettings.WorkflowOwnerType = constants.WorkflowOwnerTypeEOA @@ -47,7 +47,7 @@ func TestNonInteractive_WithYes_Proceeds(t *testing.T) { ctx := simulatedEnvironment.NewRuntimeContext() ctx.Settings = &settings.Settings{ User: settings.UserSettings{ - EthPrivateKey: chainsim.TestPrivateKey, + PrivateKeys: map[string]string{settings.EVM.Name: chainsim.TestPrivateKey}, }, } ctx.Settings.Workflow.UserWorkflowSettings.WorkflowOwnerType = constants.WorkflowOwnerTypeEOA @@ -134,7 +134,7 @@ func TestWorkflowDeleteCommand(t *testing.T) { ctx := simulatedEnvironment.NewRuntimeContext() ctx.Settings = &settings.Settings{ User: settings.UserSettings{ - EthPrivateKey: chainsim.TestPrivateKey, + PrivateKeys: map[string]string{settings.EVM.Name: chainsim.TestPrivateKey}, }, } ctx.Settings.Workflow.UserWorkflowSettings.WorkflowOwnerType = constants.WorkflowOwnerTypeEOA diff --git a/cmd/workflow/pause/pause_test.go b/cmd/workflow/pause/pause_test.go index 3af6e2f6..89c5af9a 100644 --- a/cmd/workflow/pause/pause_test.go +++ b/cmd/workflow/pause/pause_test.go @@ -20,7 +20,7 @@ func TestNonInteractive_WithoutYes_ReturnsError(t *testing.T) { ctx := simulatedEnvironment.NewRuntimeContext() ctx.Settings = &settings.Settings{ User: settings.UserSettings{ - EthPrivateKey: chainsim.TestPrivateKey, + PrivateKeys: map[string]string{settings.EVM.Name: chainsim.TestPrivateKey}, }, } ctx.Settings.Workflow.UserWorkflowSettings.WorkflowOwnerType = constants.WorkflowOwnerTypeEOA @@ -46,7 +46,7 @@ func TestNonInteractive_WithYes_PassesGuard(t *testing.T) { ctx := simulatedEnvironment.NewRuntimeContext() ctx.Settings = &settings.Settings{ User: settings.UserSettings{ - EthPrivateKey: chainsim.TestPrivateKey, + PrivateKeys: map[string]string{settings.EVM.Name: chainsim.TestPrivateKey}, }, } ctx.Settings.Workflow.UserWorkflowSettings.WorkflowOwnerType = constants.WorkflowOwnerTypeEOA @@ -140,7 +140,7 @@ func TestWorkflowPauseCommand(t *testing.T) { ctx := simulatedEnvironment.NewRuntimeContext() ctx.Settings = &settings.Settings{ User: settings.UserSettings{ - EthPrivateKey: chainsim.TestPrivateKey, + PrivateKeys: map[string]string{settings.EVM.Name: chainsim.TestPrivateKey}, }, } ctx.Settings.Workflow.UserWorkflowSettings.WorkflowOwnerType = constants.WorkflowOwnerTypeEOA diff --git a/cmd/workflow/simulate/chain/aptos/capabilities.go b/cmd/workflow/simulate/chain/aptos/capabilities.go new file mode 100644 index 00000000..a44358a1 --- /dev/null +++ b/cmd/workflow/simulate/chain/aptos/capabilities.go @@ -0,0 +1,78 @@ +package aptos + +import ( + "context" + "fmt" + + "github.com/aptos-labs/aptos-go-sdk" + "github.com/aptos-labs/aptos-go-sdk/crypto" + + aptosfakes "github.com/smartcontractkit/chainlink-aptos/fakes" + aptosserver "github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/aptos/server" + "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink/v2/core/capabilities" + + "github.com/smartcontractkit/cre-cli/cmd/workflow/simulate/chain" +) + +// AptosChainCapabilities holds the per-selector FakeAptosChain instances +// created for simulation. +type AptosChainCapabilities struct { + AptosChains map[uint64]*aptosfakes.FakeAptosChain +} + +// NewAptosChainCapabilities builds FakeAptosChain instances for every +// (selector -> client) pair, optionally wraps them with LimitedAptosChain, +// and registers each with the capability registry. +func NewAptosChainCapabilities( + ctx context.Context, + lggr logger.Logger, + registry *capabilities.Registry, + clients map[uint64]aptosfakes.AptosClient, + forwarders map[uint64]string, + privateKey *crypto.Ed25519PrivateKey, + dryRunChainWrite bool, + limits chain.Limits, +) (*AptosChainCapabilities, error) { + chains := make(map[uint64]*aptosfakes.FakeAptosChain) + for sel, client := range clients { + fwdStr, ok := forwarders[sel] + if !ok { + lggr.Infow("Forwarder not found for chain", "selector", sel) + continue + } + var fwd aptos.AccountAddress + if err := fwd.ParseStringRelaxed(fwdStr); err != nil { + return nil, fmt.Errorf("parse forwarder for selector %d: %w", sel, err) + } + fc, err := aptosfakes.NewFakeAptosChain(lggr, client, privateKey, fwd, sel, dryRunChainWrite) + if err != nil { + return nil, fmt.Errorf("new FakeAptosChain for selector %d: %w", sel, err) + } + capability := NewLimitedAptosChain(fc, limits) + server := aptosserver.NewClientServer(capability) + if err := registry.Add(ctx, server); err != nil { + return nil, fmt.Errorf("register aptos capability for selector %d: %w", sel, err) + } + chains[sel] = fc + } + return &AptosChainCapabilities{AptosChains: chains}, nil +} + +func (c *AptosChainCapabilities) Start(ctx context.Context) error { + for _, fc := range c.AptosChains { + if err := fc.Start(ctx); err != nil { + return err + } + } + return nil +} + +func (c *AptosChainCapabilities) Close() error { + for _, fc := range c.AptosChains { + if err := fc.Close(); err != nil { + return err + } + } + return nil +} diff --git a/cmd/workflow/simulate/chain/aptos/chaintype.go b/cmd/workflow/simulate/chain/aptos/chaintype.go new file mode 100644 index 00000000..e5dd0aa7 --- /dev/null +++ b/cmd/workflow/simulate/chain/aptos/chaintype.go @@ -0,0 +1,195 @@ +package aptos + +import ( + "context" + "encoding/hex" + "fmt" + "strings" + + "github.com/aptos-labs/aptos-go-sdk/crypto" + "github.com/rs/zerolog" + "github.com/spf13/viper" + + aptosfakes "github.com/smartcontractkit/chainlink-aptos/fakes" + corekeys "github.com/smartcontractkit/chainlink-common/keystore/corekeys" + "github.com/smartcontractkit/chainlink-common/pkg/services" + + "github.com/smartcontractkit/cre-cli/cmd/workflow/simulate/chain" + "github.com/smartcontractkit/cre-cli/internal/settings" + "github.com/smartcontractkit/cre-cli/internal/ui" +) + +const defaultSentinelAptosSeed = "0000000000000000000000000000000000000000000000000000000000000001" + +func init() { + chain.Register(string(corekeys.Aptos), func(lggr *zerolog.Logger) chain.ChainType { + return &AptosChainType{log: lggr} + }, nil) +} + +// AptosChainType implements chain.ChainType for Aptos. +type AptosChainType struct { + log *zerolog.Logger + aptosChains *AptosChainCapabilities +} + +var _ chain.ChainType = (*AptosChainType)(nil) + +func (ct *AptosChainType) Name() string { return string(corekeys.Aptos) } +func (ct *AptosChainType) SupportedChains() []chain.ChainConfig { return SupportedChains } + +func (ct *AptosChainType) ResolveClients(v *viper.Viper) (chain.ResolvedChains, error) { + clients := make(map[uint64]chain.ChainClient) + forwarders := make(map[uint64]string) + experimental := make(map[uint64]bool) + for _, c := range SupportedChains { + name, err := settings.GetChainNameByChainSelector(c.Selector) + if err != nil { + ct.log.Error().Msgf("Invalid Aptos chain selector %d; skipping", c.Selector) + continue + } + rpcURL, err := settings.GetRpcUrlSettings(v, name) + if err != nil || strings.TrimSpace(rpcURL) == "" { + ct.log.Debug().Msgf("RPC not provided for %s; skipping", name) + continue + } + ct.log.Debug().Msgf("Using RPC for %s: %s", name, chain.RedactURL(rpcURL)) + client, err := aptosfakes.NewAptosClient(rpcURL) + if err != nil { + ui.Warning(fmt.Sprintf("Failed to build Aptos client for %s: %v", name, err)) + continue + } + clients[c.Selector] = client + if strings.TrimSpace(c.Forwarder) != "" { + forwarders[c.Selector] = c.Forwarder + } + } + + expChains, err := settings.GetExperimentalChains(v) + if err != nil { + return chain.ResolvedChains{}, fmt.Errorf("failed to load experimental chains config: %w", err) + } + for _, ec := range expChains { + if !strings.EqualFold(ec.ChainType, ct.Name()) { + continue + } + if ec.ChainSelector == 0 { + return chain.ResolvedChains{}, fmt.Errorf("experimental chain missing chain-selector") + } + if strings.TrimSpace(ec.RPCURL) == "" { + return chain.ResolvedChains{}, fmt.Errorf("experimental aptos chain %d missing rpc-url", ec.ChainSelector) + } + forwarder := strings.TrimSpace(ec.Forwarder) + if forwarder == "" { + return chain.ResolvedChains{}, fmt.Errorf("experimental aptos chain %d missing forwarder", ec.ChainSelector) + } + if _, exists := clients[ec.ChainSelector]; exists { + if forwarders[ec.ChainSelector] != forwarder { + ui.Warning(fmt.Sprintf("Warning: experimental aptos chain %d overrides supported chain forwarder (supported: %s, experimental: %s)\n", + ec.ChainSelector, forwarders[ec.ChainSelector], forwarder)) + forwarders[ec.ChainSelector] = forwarder + } else { + ct.log.Debug().Uint64("chain-selector", ec.ChainSelector).Msg("Experimental chain matches supported chain config") + } + continue + } + ct.log.Debug().Msgf("Using RPC for experimental aptos chain %d: %s", ec.ChainSelector, chain.RedactURL(ec.RPCURL)) + client, err := aptosfakes.NewAptosClient(ec.RPCURL) + if err != nil { + return chain.ResolvedChains{}, fmt.Errorf("failed to create aptos client for experimental chain %d: %w", ec.ChainSelector, err) + } + clients[ec.ChainSelector] = client + forwarders[ec.ChainSelector] = forwarder + experimental[ec.ChainSelector] = true + ui.Dim(fmt.Sprintf("Added experimental aptos chain (chain-selector: %d)\n", ec.ChainSelector)) + } + + return chain.ResolvedChains{Clients: clients, Forwarders: forwarders, ExperimentalSelectors: experimental}, nil +} + +func (ct *AptosChainType) ResolveKey(s *settings.Settings, broadcast bool) (interface{}, error) { + seed := strings.TrimPrefix(strings.ToLower(strings.TrimSpace(s.User.PrivateKey(settings.Aptos))), "0x") + bytes, err := hex.DecodeString(seed) + if err != nil || len(bytes) != 32 { + if broadcast { + if err != nil { + return nil, fmt.Errorf("failed to parse private key, required to broadcast. Please check CRE_APTOS_PRIVATE_KEY in your .env file or system environment: %w", err) + } + return nil, fmt.Errorf("CRE_APTOS_PRIVATE_KEY must be 32 hex bytes (64 chars); got len=%d. Please check CRE_APTOS_PRIVATE_KEY in your .env file or system environment", len(bytes)) + } + bytes, _ = hex.DecodeString(defaultSentinelAptosSeed) + ui.Warning("Using default Aptos private key for chain write simulation. To use your own key, set CRE_APTOS_PRIVATE_KEY in your .env file or system environment.") + } + sentinel, _ := hex.DecodeString(defaultSentinelAptosSeed) + if broadcast && hex.EncodeToString(bytes) == hex.EncodeToString(sentinel) { + return nil, fmt.Errorf("you must configure a valid Aptos private key to perform on-chain writes. Please set CRE_APTOS_PRIVATE_KEY in your .env file or system environment before using the --broadcast flag") + } + k := &crypto.Ed25519PrivateKey{} + if err := k.FromBytes(bytes); err != nil { + return nil, fmt.Errorf("build Ed25519 key: %w", err) + } + return k, nil +} + +func (ct *AptosChainType) ResolveTriggerData(_ context.Context, _ uint64, _ chain.TriggerParams) (interface{}, error) { + return nil, fmt.Errorf("aptos: no trigger surface") +} + +func (ct *AptosChainType) RegisterCapabilities(ctx context.Context, cfg chain.CapabilityConfig) ([]services.Service, error) { + typedClients := make(map[uint64]aptosfakes.AptosClient, len(cfg.Clients)) + for sel, c := range cfg.Clients { + ac, ok := c.(aptosfakes.AptosClient) + if !ok { + return nil, fmt.Errorf("aptos: client for selector %d is not aptosfakes.AptosClient", sel) + } + typedClients[sel] = ac + } + var pk *crypto.Ed25519PrivateKey + if cfg.PrivateKey != nil { + var ok bool + pk, ok = cfg.PrivateKey.(*crypto.Ed25519PrivateKey) + if !ok { + return nil, fmt.Errorf("aptos: private key is not *crypto.Ed25519PrivateKey") + } + } + var lim chain.Limits + if cfg.Limits != nil { + lim = ExtractLimits(cfg.Limits) + } + caps, err := NewAptosChainCapabilities(ctx, cfg.Logger, cfg.Registry, typedClients, cfg.Forwarders, pk, !cfg.Broadcast, lim) + if err != nil { + return nil, err + } + if err := caps.Start(ctx); err != nil { + return nil, fmt.Errorf("aptos: failed to start: %w", err) + } + ct.aptosChains = caps + out := make([]services.Service, 0, len(caps.AptosChains)) + for _, fc := range caps.AptosChains { + out = append(out, fc) + } + return out, nil +} + +func (ct *AptosChainType) ExecuteTrigger(_ context.Context, _ uint64, _ string, _ interface{}) error { + return fmt.Errorf("aptos: no trigger surface") +} + +func (ct *AptosChainType) Supports(selector uint64) bool { + if ct.aptosChains == nil { + return false + } + return ct.aptosChains.AptosChains[selector] != nil +} + +func (ct *AptosChainType) ParseTriggerChainSelector(triggerID string) (uint64, bool) { + return chain.ParseTriggerChainSelector(ct.Name(), triggerID) +} + +func (ct *AptosChainType) RunHealthCheck(resolved chain.ResolvedChains) error { + return RunRPCHealthCheck(resolved.Clients, resolved.ExperimentalSelectors) +} + +func (ct *AptosChainType) CollectCLIInputs(_ *viper.Viper) map[string]string { + return map[string]string{} +} diff --git a/cmd/workflow/simulate/chain/aptos/chaintype_test.go b/cmd/workflow/simulate/chain/aptos/chaintype_test.go new file mode 100644 index 00000000..a2d5bc72 --- /dev/null +++ b/cmd/workflow/simulate/chain/aptos/chaintype_test.go @@ -0,0 +1,165 @@ +package aptos + +import ( + "context" + "io" + "testing" + + "github.com/rs/zerolog" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink/v2/core/capabilities" + + "github.com/smartcontractkit/cre-cli/cmd/workflow/simulate/chain" + "github.com/smartcontractkit/cre-cli/internal/settings" +) + +func nopCommonLogger() logger.Logger { return logger.NewWithSync(io.Discard) } + +func newRegistry(t *testing.T) *capabilities.Registry { + t.Helper() + return capabilities.NewRegistry(logger.Test(t)) +} + +func TestResolveKey_SentinelUnderBroadcastFails(t *testing.T) { + t.Parallel() + ct := &AptosChainType{} + s := &settings.Settings{User: settings.UserSettings{PrivateKeys: map[string]string{settings.Aptos.Name: "0000000000000000000000000000000000000000000000000000000000000001"}}} + _, err := ct.ResolveKey(s, true) + require.Error(t, err) +} + +func TestResolveKey_UnparseableUnderBroadcastFails(t *testing.T) { + t.Parallel() + ct := &AptosChainType{} + s := &settings.Settings{User: settings.UserSettings{PrivateKeys: map[string]string{settings.Aptos.Name: "not-hex"}}} + _, err := ct.ResolveKey(s, true) + require.Error(t, err) +} + +func TestResolveKey_ShortKeyUnderBroadcastFails(t *testing.T) { + t.Parallel() + ct := &AptosChainType{} + s := &settings.Settings{User: settings.UserSettings{PrivateKeys: map[string]string{settings.Aptos.Name: "1111"}}} + _, err := ct.ResolveKey(s, true) + require.Error(t, err) +} + +func TestResolveKey_UnparseableNonBroadcastFallsBackToSentinel(t *testing.T) { + t.Parallel() + ct := &AptosChainType{} + s := &settings.Settings{User: settings.UserSettings{PrivateKeys: map[string]string{settings.Aptos.Name: ""}}} + k, err := ct.ResolveKey(s, false) + require.NoError(t, err) + assert.NotNil(t, k) +} + +func TestResolveKey_ValidKeyBroadcast(t *testing.T) { + t.Parallel() + ct := &AptosChainType{} + s := &settings.Settings{User: settings.UserSettings{PrivateKeys: map[string]string{settings.Aptos.Name: "1111111111111111111111111111111111111111111111111111111111111111"}}} + k, err := ct.ResolveKey(s, true) + require.NoError(t, err) + assert.NotNil(t, k) +} + +func TestSupports_False(t *testing.T) { + t.Parallel() + ct := &AptosChainType{} + assert.False(t, ct.Supports(1)) +} + +func TestResolveTriggerData_ReturnsNoTriggerSurface(t *testing.T) { + t.Parallel() + ct := &AptosChainType{} + _, err := ct.ResolveTriggerData(context.Background(), 1, chain.TriggerParams{}) + require.Error(t, err) + assert.Contains(t, err.Error(), "no trigger surface") +} + +func TestExecuteTrigger_ReturnsNoTriggerSurface(t *testing.T) { + t.Parallel() + ct := &AptosChainType{} + err := ct.ExecuteTrigger(context.Background(), 1, "tid", nil) + require.Error(t, err) + assert.Contains(t, err.Error(), "no trigger surface") +} + +func TestRegisterCapabilities_WrongClientType(t *testing.T) { + t.Parallel() + lg := zerolog.Nop() + ct := &AptosChainType{log: &lg} + cfg := chain.CapabilityConfig{ + Clients: map[uint64]chain.ChainClient{1: "not-an-aptos-client"}, + Forwarders: map[uint64]string{1: "0x1"}, + } + _, err := ct.RegisterCapabilities(context.Background(), cfg) + require.Error(t, err) + assert.Contains(t, err.Error(), "client for selector 1 is not aptosfakes.AptosClient") +} + +func TestRegisterCapabilities_WrongPrivateKeyType(t *testing.T) { + t.Parallel() + lg := zerolog.Nop() + ct := &AptosChainType{log: &lg} + cfg := chain.CapabilityConfig{ + Clients: map[uint64]chain.ChainClient{}, + Forwarders: map[uint64]string{}, + PrivateKey: "not-an-ed25519-key", + } + _, err := ct.RegisterCapabilities(context.Background(), cfg) + require.Error(t, err) + assert.Contains(t, err.Error(), "private key is not *crypto.Ed25519PrivateKey") +} + +func TestRegisterCapabilities_NoClients_ConstructsEmpty(t *testing.T) { + t.Parallel() + lg := zerolog.Nop() + ct := &AptosChainType{log: &lg} + cfg := chain.CapabilityConfig{ + Clients: map[uint64]chain.ChainClient{}, + Forwarders: map[uint64]string{}, + Logger: nopCommonLogger(), + Registry: newRegistry(t), + } + srvcs, err := ct.RegisterCapabilities(context.Background(), cfg) + require.NoError(t, err) + assert.Empty(t, srvcs) + assert.False(t, ct.Supports(1)) +} + +func TestRunHealthCheck_PropagatesInvalidClientType(t *testing.T) { + t.Parallel() + ct := &AptosChainType{} + err := ct.RunHealthCheck(chain.ResolvedChains{ + Clients: map[uint64]chain.ChainClient{1: "not-aptos"}, + }) + require.Error(t, err) + assert.Contains(t, err.Error(), "invalid client type for Aptos chain type") +} + +func TestRegisteredInFactoryRegistry(t *testing.T) { + t.Parallel() + lg := zerolog.Nop() + chain.Build(&lg) + found := false + for _, n := range chain.Names() { + if n == "aptos" { + found = true + break + } + } + require.True(t, found, "aptos chain type should be registered at init; got %v", chain.Names()) + + ct, err := chain.Get("aptos") + require.NoError(t, err) + require.Equal(t, "aptos", ct.Name()) +} + +func TestCollectCLIInputs_ReturnsEmpty(t *testing.T) { + t.Parallel() + ct := &AptosChainType{} + assert.Empty(t, ct.CollectCLIInputs(nil)) +} diff --git a/cmd/workflow/simulate/chain/aptos/health.go b/cmd/workflow/simulate/chain/aptos/health.go new file mode 100644 index 00000000..54bc9bd7 --- /dev/null +++ b/cmd/workflow/simulate/chain/aptos/health.go @@ -0,0 +1,54 @@ +package aptos + +import ( + "errors" + "fmt" + + aptosfakes "github.com/smartcontractkit/chainlink-aptos/fakes" + + "github.com/smartcontractkit/cre-cli/cmd/workflow/simulate/chain" + "github.com/smartcontractkit/cre-cli/internal/settings" +) + +// RunRPCHealthCheck probes GetChainId() on every configured Aptos client. +// experimentalSelectors identifies chains sourced from experimental-chains config. +func RunRPCHealthCheck(clients map[uint64]chain.ChainClient, experimentalSelectors map[uint64]bool) error { + if len(clients) == 0 { + return fmt.Errorf("check your settings: no Aptos RPC URLs found for supported or experimental chains") + } + var errs []error + for sel, c := range clients { + if c == nil { + errs = append(errs, fmt.Errorf("[%d] nil client", sel)) + continue + } + ac, ok := c.(aptosfakes.AptosClient) + if !ok { + errs = append(errs, fmt.Errorf("[%d] invalid client type for Aptos chain type", sel)) + continue + } + var label string + switch { + case experimentalSelectors[sel]: + label = fmt.Sprintf("experimental chain %d", sel) + default: + if name, err := settings.GetChainNameByChainSelector(sel); err == nil { + label = name + } else { + label = fmt.Sprintf("chain %d", sel) + } + } + chainID, err := ac.GetChainId() + if err != nil { + errs = append(errs, fmt.Errorf("[%s] failed RPC health check: %w", label, err)) + continue + } + if chainID == 0 { + errs = append(errs, fmt.Errorf("[%s] invalid RPC response: zero chain ID", label)) + } + } + if len(errs) > 0 { + return errors.Join(errs...) + } + return nil +} diff --git a/cmd/workflow/simulate/chain/aptos/health_test.go b/cmd/workflow/simulate/chain/aptos/health_test.go new file mode 100644 index 00000000..81673942 --- /dev/null +++ b/cmd/workflow/simulate/chain/aptos/health_test.go @@ -0,0 +1,123 @@ +package aptos + +import ( + "errors" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + chainselectors "github.com/smartcontractkit/chain-selectors" + mocks "github.com/smartcontractkit/chainlink-aptos/relayer/monitor/mocks" + + "github.com/smartcontractkit/cre-cli/cmd/workflow/simulate/chain" +) + +func TestRunRPCHealthCheck_NoClients(t *testing.T) { + t.Parallel() + err := RunRPCHealthCheck(map[uint64]chain.ChainClient{}, nil) + require.Error(t, err) + assert.Contains(t, err.Error(), "check your settings: no Aptos RPC URLs") +} + +func TestRunRPCHealthCheck_InvalidClientType(t *testing.T) { + t.Parallel() + err := RunRPCHealthCheck(map[uint64]chain.ChainClient{1: stubNonAptosClient{}}, nil) + require.Error(t, err) + assert.Contains(t, err.Error(), "invalid client type") + assert.Contains(t, err.Error(), "[1]") +} + +func TestRunRPCHealthCheck_NilClient(t *testing.T) { + t.Parallel() + err := RunRPCHealthCheck(map[uint64]chain.ChainClient{9: nil}, nil) + require.Error(t, err) + assert.Contains(t, err.Error(), "[9] nil client") +} + +func TestRunRPCHealthCheck_Healthy(t *testing.T) { + t.Parallel() + rpc := mocks.NewAptosRpcClient(t) + rpc.EXPECT().GetChainId().Return(uint8(1), nil).Once() + require.NoError(t, RunRPCHealthCheck(map[uint64]chain.ChainClient{1: rpc}, nil)) +} + +func TestRunRPCHealthCheck_ZeroChainID(t *testing.T) { + t.Parallel() + rpc := mocks.NewAptosRpcClient(t) + rpc.EXPECT().GetChainId().Return(uint8(0), nil).Once() + err := RunRPCHealthCheck(map[uint64]chain.ChainClient{7: rpc}, nil) + require.Error(t, err) + assert.Contains(t, err.Error(), "zero chain ID") + assert.Contains(t, err.Error(), "[chain 7]") +} + +func TestRunRPCHealthCheck_RPCError(t *testing.T) { + t.Parallel() + rpc := mocks.NewAptosRpcClient(t) + rpc.EXPECT().GetChainId().Return(uint8(0), errors.New("boom")).Once() + err := RunRPCHealthCheck(map[uint64]chain.ChainClient{3: rpc}, nil) + require.Error(t, err) + assert.Contains(t, err.Error(), "boom") + assert.Contains(t, err.Error(), "[chain 3]") +} + +func TestRunRPCHealthCheck_NamedChain(t *testing.T) { + t.Parallel() + rpc := mocks.NewAptosRpcClient(t) + rpc.EXPECT().GetChainId().Return(uint8(0), errors.New("unreachable")).Once() + err := RunRPCHealthCheck( + map[uint64]chain.ChainClient{chainselectors.APTOS_TESTNET.Selector: rpc}, + nil, + ) + require.Error(t, err) + assert.Contains(t, err.Error(), "[aptos-testnet]") +} + +func TestRunRPCHealthCheck_ExperimentalLabel(t *testing.T) { + t.Parallel() + rpc := mocks.NewAptosRpcClient(t) + rpc.EXPECT().GetChainId().Return(uint8(0), nil).Once() + err := RunRPCHealthCheck( + map[uint64]chain.ChainClient{42: rpc}, + map[uint64]bool{42: true}, + ) + require.Error(t, err) + assert.Contains(t, err.Error(), "experimental chain 42") +} + +func TestRunRPCHealthCheck_AggregatesMultiple(t *testing.T) { + t.Parallel() + bad := mocks.NewAptosRpcClient(t) + bad.EXPECT().GetChainId().Return(uint8(0), errors.New("net down")).Once() + zero := mocks.NewAptosRpcClient(t) + zero.EXPECT().GetChainId().Return(uint8(0), nil).Once() + err := RunRPCHealthCheck(map[uint64]chain.ChainClient{1: bad, 2: zero}, nil) + require.Error(t, err) + assert.Contains(t, err.Error(), "net down") + assert.Contains(t, err.Error(), "zero chain ID") +} + +func TestRunRPCHealthCheck_MixedKnownAndExperimental(t *testing.T) { + t.Parallel() + healthy := mocks.NewAptosRpcClient(t) + healthy.EXPECT().GetChainId().Return(uint8(1), nil).Once() + bad := mocks.NewAptosRpcClient(t) + bad.EXPECT().GetChainId().Return(uint8(0), errors.New("boom")).Once() + + const expSel uint64 = 99999999 + err := RunRPCHealthCheck( + map[uint64]chain.ChainClient{ + chainselectors.APTOS_TESTNET.Selector: healthy, + expSel: bad, + }, + map[uint64]bool{expSel: true}, + ) + require.Error(t, err) + assert.Contains(t, err.Error(), "[experimental chain 99999999]") + assert.Contains(t, err.Error(), "boom") + // healthy named chain must not appear in errors. + assert.NotContains(t, err.Error(), "[aptos-testnet]") +} + +type stubNonAptosClient struct{} diff --git a/cmd/workflow/simulate/chain/aptos/limited_capabilities.go b/cmd/workflow/simulate/chain/aptos/limited_capabilities.go new file mode 100644 index 00000000..30591298 --- /dev/null +++ b/cmd/workflow/simulate/chain/aptos/limited_capabilities.go @@ -0,0 +1,70 @@ +package aptos + +import ( + "context" + "fmt" + + commonCap "github.com/smartcontractkit/chainlink-common/pkg/capabilities" + caperrors "github.com/smartcontractkit/chainlink-common/pkg/capabilities/errors" + aptoscappb "github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/aptos" + aptosserver "github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/aptos/server" + "github.com/smartcontractkit/chainlink-common/pkg/types/core" + + "github.com/smartcontractkit/cre-cli/cmd/workflow/simulate/chain" +) + +// LimitedAptosChain enforces chain-write size + Aptos max_gas_amount. +type LimitedAptosChain struct { + inner aptosserver.ClientCapability + limits chain.Limits +} + +var _ aptosserver.ClientCapability = (*LimitedAptosChain)(nil) + +func NewLimitedAptosChain(inner aptosserver.ClientCapability, limits chain.Limits) *LimitedAptosChain { + return &LimitedAptosChain{inner: inner, limits: limits} +} + +func (l *LimitedAptosChain) WriteReport(ctx context.Context, metadata commonCap.RequestMetadata, input *aptoscappb.WriteReportRequest) (*commonCap.ResponseAndMetadata[*aptoscappb.WriteReportReply], caperrors.Error) { + if input.Report != nil { + if lim := l.limits.ReportSize; lim > 0 && len(input.Report.RawReport) > lim { + return nil, caperrors.NewPublicUserError( + fmt.Errorf("simulation limit exceeded: Aptos chain write report size %d bytes exceeds limit of %d bytes", len(input.Report.RawReport), lim), + caperrors.ResourceExhausted, + ) + } + } + if input.GasConfig != nil { + if gl := l.limits.GasLimit; gl > 0 && input.GasConfig.MaxGasAmount > gl { + return nil, caperrors.NewPublicUserError( + fmt.Errorf("simulation limit exceeded: Aptos max_gas_amount %d exceeds maximum of %d", input.GasConfig.MaxGasAmount, gl), + caperrors.ResourceExhausted, + ) + } + } + return l.inner.WriteReport(ctx, metadata, input) +} + +func (l *LimitedAptosChain) AccountAPTBalance(ctx context.Context, m commonCap.RequestMetadata, i *aptoscappb.AccountAPTBalanceRequest) (*commonCap.ResponseAndMetadata[*aptoscappb.AccountAPTBalanceReply], caperrors.Error) { + return l.inner.AccountAPTBalance(ctx, m, i) +} +func (l *LimitedAptosChain) View(ctx context.Context, m commonCap.RequestMetadata, i *aptoscappb.ViewRequest) (*commonCap.ResponseAndMetadata[*aptoscappb.ViewReply], caperrors.Error) { + return l.inner.View(ctx, m, i) +} +func (l *LimitedAptosChain) TransactionByHash(ctx context.Context, m commonCap.RequestMetadata, i *aptoscappb.TransactionByHashRequest) (*commonCap.ResponseAndMetadata[*aptoscappb.TransactionByHashReply], caperrors.Error) { + return l.inner.TransactionByHash(ctx, m, i) +} +func (l *LimitedAptosChain) AccountTransactions(ctx context.Context, m commonCap.RequestMetadata, i *aptoscappb.AccountTransactionsRequest) (*commonCap.ResponseAndMetadata[*aptoscappb.AccountTransactionsReply], caperrors.Error) { + return l.inner.AccountTransactions(ctx, m, i) +} + +func (l *LimitedAptosChain) ChainSelector() uint64 { return l.inner.ChainSelector() } +func (l *LimitedAptosChain) Start(ctx context.Context) error { return l.inner.Start(ctx) } +func (l *LimitedAptosChain) Close() error { return l.inner.Close() } +func (l *LimitedAptosChain) HealthReport() map[string]error { return l.inner.HealthReport() } +func (l *LimitedAptosChain) Name() string { return l.inner.Name() } +func (l *LimitedAptosChain) Description() string { return l.inner.Description() } +func (l *LimitedAptosChain) Ready() error { return l.inner.Ready() } +func (l *LimitedAptosChain) Initialise(ctx context.Context, deps core.StandardCapabilitiesDependencies) error { + return l.inner.Initialise(ctx, deps) +} diff --git a/cmd/workflow/simulate/chain/aptos/limited_capabilities_test.go b/cmd/workflow/simulate/chain/aptos/limited_capabilities_test.go new file mode 100644 index 00000000..8bbc4ddc --- /dev/null +++ b/cmd/workflow/simulate/chain/aptos/limited_capabilities_test.go @@ -0,0 +1,118 @@ +package aptos + +import ( + "context" + "fmt" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + commonCap "github.com/smartcontractkit/chainlink-common/pkg/capabilities" + caperrors "github.com/smartcontractkit/chainlink-common/pkg/capabilities/errors" + aptoscappb "github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/aptos" + "github.com/smartcontractkit/chainlink-common/pkg/types/core" + sdk "github.com/smartcontractkit/chainlink-protos/cre/go/sdk" + + "github.com/smartcontractkit/cre-cli/cmd/workflow/simulate/chain" +) + +type stubCap struct{ writeCalled bool } + +func (s *stubCap) AccountAPTBalance(context.Context, commonCap.RequestMetadata, *aptoscappb.AccountAPTBalanceRequest) (*commonCap.ResponseAndMetadata[*aptoscappb.AccountAPTBalanceReply], caperrors.Error) { + return nil, nil +} +func (s *stubCap) View(context.Context, commonCap.RequestMetadata, *aptoscappb.ViewRequest) (*commonCap.ResponseAndMetadata[*aptoscappb.ViewReply], caperrors.Error) { + return nil, nil +} +func (s *stubCap) TransactionByHash(context.Context, commonCap.RequestMetadata, *aptoscappb.TransactionByHashRequest) (*commonCap.ResponseAndMetadata[*aptoscappb.TransactionByHashReply], caperrors.Error) { + return nil, nil +} +func (s *stubCap) AccountTransactions(context.Context, commonCap.RequestMetadata, *aptoscappb.AccountTransactionsRequest) (*commonCap.ResponseAndMetadata[*aptoscappb.AccountTransactionsReply], caperrors.Error) { + return nil, nil +} +func (s *stubCap) WriteReport(context.Context, commonCap.RequestMetadata, *aptoscappb.WriteReportRequest) (*commonCap.ResponseAndMetadata[*aptoscappb.WriteReportReply], caperrors.Error) { + s.writeCalled = true + return &commonCap.ResponseAndMetadata[*aptoscappb.WriteReportReply]{Response: &aptoscappb.WriteReportReply{}}, nil +} +func (s *stubCap) ChainSelector() uint64 { return 0 } +func (s *stubCap) Start(context.Context) error { return nil } +func (s *stubCap) Close() error { return nil } +func (s *stubCap) HealthReport() map[string]error { return nil } +func (s *stubCap) Name() string { return "stub" } +func (s *stubCap) Description() string { return "" } +func (s *stubCap) Ready() error { return nil } +func (s *stubCap) Initialise(context.Context, core.StandardCapabilitiesDependencies) error { + return nil +} + +func TestLimitedAptosChain_WriteReport_ReportTooLarge(t *testing.T) { + t.Parallel() + inner := &stubCap{} + l := NewLimitedAptosChain(inner, chain.Limits{ReportSize: 10, GasLimit: 1000}) + _, capErr := l.WriteReport(context.Background(), commonCap.RequestMetadata{}, &aptoscappb.WriteReportRequest{ + Report: &sdk.ReportResponse{RawReport: make([]byte, 11)}, + }) + require.NotNil(t, capErr) + assert.Contains(t, fmt.Sprint(capErr), "Aptos chain write report size 11 bytes exceeds limit of 10 bytes") + assert.False(t, inner.writeCalled) +} + +func TestLimitedAptosChain_WriteReport_MaxGasTooHigh(t *testing.T) { + t.Parallel() + inner := &stubCap{} + l := NewLimitedAptosChain(inner, chain.Limits{ReportSize: 100, GasLimit: 100}) + _, capErr := l.WriteReport(context.Background(), commonCap.RequestMetadata{}, &aptoscappb.WriteReportRequest{ + Report: &sdk.ReportResponse{RawReport: []byte("x")}, + GasConfig: &aptoscappb.GasConfig{MaxGasAmount: 101}, + }) + require.NotNil(t, capErr) + assert.Contains(t, fmt.Sprint(capErr), "Aptos max_gas_amount 101 exceeds maximum of 100") + assert.False(t, inner.writeCalled) +} + +func TestLimitedAptosChain_WriteReport_Delegates(t *testing.T) { + t.Parallel() + inner := &stubCap{} + l := NewLimitedAptosChain(inner, chain.Limits{ReportSize: 100, GasLimit: 1000}) + _, capErr := l.WriteReport(context.Background(), commonCap.RequestMetadata{}, &aptoscappb.WriteReportRequest{ + Report: &sdk.ReportResponse{RawReport: []byte("x")}, + GasConfig: &aptoscappb.GasConfig{MaxGasAmount: 50}, + }) + require.Nil(t, capErr) + assert.True(t, inner.writeCalled) +} + +func TestLimitedAptosChain_WriteReport_ZeroLimitsDelegate(t *testing.T) { + t.Parallel() + inner := &stubCap{} + l := NewLimitedAptosChain(inner, chain.Limits{}) + _, capErr := l.WriteReport(context.Background(), commonCap.RequestMetadata{}, &aptoscappb.WriteReportRequest{ + Report: &sdk.ReportResponse{RawReport: make([]byte, 1_000_000)}, + GasConfig: &aptoscappb.GasConfig{MaxGasAmount: 1_000_000_000}, + }) + require.Nil(t, capErr) + assert.True(t, inner.writeCalled) +} + +func TestLimitedAptosChain_WriteReport_NilGasConfigDelegates(t *testing.T) { + t.Parallel() + inner := &stubCap{} + l := NewLimitedAptosChain(inner, chain.Limits{ReportSize: 100, GasLimit: 1000}) + _, capErr := l.WriteReport(context.Background(), commonCap.RequestMetadata{}, &aptoscappb.WriteReportRequest{ + Report: &sdk.ReportResponse{RawReport: []byte("x")}, + }) + require.Nil(t, capErr) + assert.True(t, inner.writeCalled) +} + +func TestLimitedAptosChain_WriteReport_NilReportDelegates(t *testing.T) { + t.Parallel() + inner := &stubCap{} + l := NewLimitedAptosChain(inner, chain.Limits{ReportSize: 100, GasLimit: 1000}) + _, capErr := l.WriteReport(context.Background(), commonCap.RequestMetadata{}, &aptoscappb.WriteReportRequest{ + GasConfig: &aptoscappb.GasConfig{MaxGasAmount: 50}, + }) + require.Nil(t, capErr) + assert.True(t, inner.writeCalled) +} diff --git a/cmd/workflow/simulate/chain/aptos/limits.go b/cmd/workflow/simulate/chain/aptos/limits.go new file mode 100644 index 00000000..a8e919b6 --- /dev/null +++ b/cmd/workflow/simulate/chain/aptos/limits.go @@ -0,0 +1,14 @@ +package aptos + +import ( + "github.com/smartcontractkit/chainlink-common/pkg/settings/cresettings" + + "github.com/smartcontractkit/cre-cli/cmd/workflow/simulate/chain" +) + +func ExtractLimits(w *cresettings.Workflows) chain.Limits { + return chain.Limits{ + ReportSize: int(w.ChainWrite.Aptos.ReportSizeLimit.DefaultValue), + GasLimit: w.ChainWrite.Aptos.GasLimit.Default.DefaultValue, + } +} diff --git a/cmd/workflow/simulate/chain/aptos/limits_test.go b/cmd/workflow/simulate/chain/aptos/limits_test.go new file mode 100644 index 00000000..e7ecd506 --- /dev/null +++ b/cmd/workflow/simulate/chain/aptos/limits_test.go @@ -0,0 +1,17 @@ +package aptos + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "github.com/smartcontractkit/chainlink-common/pkg/settings/cresettings" +) + +func TestExtractLimitsFromDefault(t *testing.T) { + t.Parallel() + w := cresettings.Default.PerWorkflow + lim := ExtractLimits(&w) + assert.Equal(t, 5_000, lim.ReportSize) + assert.Equal(t, uint64(2_000_000), lim.GasLimit) +} diff --git a/cmd/workflow/simulate/chain/aptos/supported_chains.go b/cmd/workflow/simulate/chain/aptos/supported_chains.go new file mode 100644 index 00000000..1cfa96c6 --- /dev/null +++ b/cmd/workflow/simulate/chain/aptos/supported_chains.go @@ -0,0 +1,18 @@ +package aptos + +import ( + chainselectors "github.com/smartcontractkit/chain-selectors" + + "github.com/smartcontractkit/cre-cli/cmd/workflow/simulate/chain" +) + +// placeholderForwarder is used until canonical platform_mock addresses are +// published per network. Users override via experimental-chains config +// (chain-type: aptos). +const placeholderForwarder = "0x0000000000000000000000000000000000000000000000000000000000000000" + +// SupportedChains lists Aptos networks cre-cli simulate can target. +var SupportedChains = []chain.ChainConfig{ + {Selector: chainselectors.APTOS_MAINNET.Selector, Forwarder: placeholderForwarder}, + {Selector: chainselectors.APTOS_TESTNET.Selector, Forwarder: placeholderForwarder}, +} diff --git a/cmd/workflow/simulate/chain/aptos/supported_chains_test.go b/cmd/workflow/simulate/chain/aptos/supported_chains_test.go new file mode 100644 index 00000000..0bc7e57d --- /dev/null +++ b/cmd/workflow/simulate/chain/aptos/supported_chains_test.go @@ -0,0 +1,82 @@ +package aptos + +import ( + "regexp" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + chainselectors "github.com/smartcontractkit/chain-selectors" +) + +// Aptos forwarders are 32-byte object addresses encoded as 64 hex chars. +var forwarderRe = regexp.MustCompile(`^0x[0-9a-fA-F]{64}$`) + +func TestSupportedChains_AllSelectorsNonZero(t *testing.T) { + t.Parallel() + for i, c := range SupportedChains { + require.NotZerof(t, c.Selector, "index %d has zero selector", i) + } +} + +func TestSupportedChains_AllSelectorsUnique(t *testing.T) { + t.Parallel() + seen := map[uint64]int{} + for i, c := range SupportedChains { + if prev, ok := seen[c.Selector]; ok { + t.Fatalf("duplicate selector %d at indices %d and %d", c.Selector, prev, i) + } + seen[c.Selector] = i + } +} + +func TestSupportedChains_AllForwardersValidHexAddress(t *testing.T) { + t.Parallel() + for _, c := range SupportedChains { + assert.True(t, forwarderRe.MatchString(c.Forwarder), + "selector %d: invalid forwarder hex %q", c.Selector, c.Forwarder) + } +} + +func TestSupportedChains_AllSelectorsResolveToChainName(t *testing.T) { + t.Parallel() + for _, c := range SupportedChains { + info, err := chainselectors.GetSelectorFamily(c.Selector) + require.NoErrorf(t, err, "selector %d missing family", c.Selector) + assert.NotEmpty(t, info) + } +} + +func TestSupportedChains_NoForwarderEmpty(t *testing.T) { + t.Parallel() + for i, c := range SupportedChains { + require.NotEmpty(t, c.Forwarder, "supported chain at index %d has empty forwarder", i) + } +} + +func TestSupportedChains_ReturnedByChainType(t *testing.T) { + t.Parallel() + ct := &AptosChainType{} + ret := ct.SupportedChains() + require.Equal(t, len(SupportedChains), len(ret)) + for i, c := range SupportedChains { + assert.Equal(t, c.Selector, ret[i].Selector, "selector at index %d", i) + assert.Equal(t, c.Forwarder, ret[i].Forwarder, "forwarder at index %d", i) + } +} + +func TestSupportedChains_MainnetAndTestnet(t *testing.T) { + t.Parallel() + var hasMainnet, hasTestnet bool + for _, c := range SupportedChains { + switch c.Selector { + case chainselectors.APTOS_MAINNET.Selector: + hasMainnet = true + case chainselectors.APTOS_TESTNET.Selector: + hasTestnet = true + } + } + assert.True(t, hasMainnet) + assert.True(t, hasTestnet) +} diff --git a/cmd/workflow/simulate/chain/evm/capabilities.go b/cmd/workflow/simulate/chain/evm/capabilities.go index 22f000b1..88348b2a 100644 --- a/cmd/workflow/simulate/chain/evm/capabilities.go +++ b/cmd/workflow/simulate/chain/evm/capabilities.go @@ -3,6 +3,7 @@ package evm import ( "context" "crypto/ecdsa" + "fmt" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethclient" @@ -11,6 +12,8 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink/v2/core/capabilities" "github.com/smartcontractkit/chainlink/v2/core/capabilities/fakes" + + "github.com/smartcontractkit/cre-cli/cmd/workflow/simulate/chain" ) // EVMChainCapabilities holds the EVM chain capability servers created for simulation. @@ -29,7 +32,7 @@ func NewEVMChainCapabilities( forwarders map[uint64]string, privateKey *ecdsa.PrivateKey, dryRunChainWrite bool, - limits EVMChainLimits, + limits chain.Limits, ) (*EVMChainCapabilities, error) { evmChains := make(map[uint64]*fakes.FakeEVMChain) for sel, client := range clients { @@ -48,15 +51,11 @@ func NewEVMChainCapabilities( dryRunChainWrite, ) - // Wrap with limits enforcement if limits are provided - var evmCap evmserver.ClientCapability = evm - if limits != nil { - evmCap = NewLimitedEVMChain(evm, limits) - } + evmCap := NewLimitedEVMChain(evm, limits) evmServer := evmserver.NewClientServer(evmCap) if err := registry.Add(ctx, evmServer); err != nil { - return nil, err + return nil, fmt.Errorf("register evm capability for selector %d: %w", sel, err) } evmChains[sel] = evm diff --git a/cmd/workflow/simulate/chain/evm/chaintype.go b/cmd/workflow/simulate/chain/evm/chaintype.go index 5cece5ef..49ef907b 100644 --- a/cmd/workflow/simulate/chain/evm/chaintype.go +++ b/cmd/workflow/simulate/chain/evm/chaintype.go @@ -87,6 +87,10 @@ func (ct *EVMChainType) ResolveClients(v *viper.Viper) (chain.ResolvedChains, er } for _, ec := range expChains { + // Empty chain-type falls back to this chain type + if ec.ChainType != "" && !strings.EqualFold(ec.ChainType, ct.Name()) { + continue + } if ec.ChainSelector == 0 { return chain.ResolvedChains{}, fmt.Errorf("experimental chain missing chain-selector") } @@ -151,16 +155,9 @@ func (ct *EVMChainType) RegisterCapabilities(ctx context.Context, cfg chain.Capa dryRun := !cfg.Broadcast - // cfg.Limits is the generic chain.Limits contract. The EVM chain type - // needs the wider EVMChainLimits contract (adds ChainWriteGasLimit). A - // nil cfg.Limits disables enforcement entirely. - var evmLimits EVMChainLimits + var evmLimits chain.Limits if cfg.Limits != nil { - el, ok := cfg.Limits.(EVMChainLimits) - if !ok { - return nil, fmt.Errorf("EVM chain type: limits value does not implement evm.EVMChainLimits (got %T)", cfg.Limits) - } - evmLimits = el + evmLimits = ExtractLimits(cfg.Limits) } evmCaps, err := NewEVMChainCapabilities( @@ -221,12 +218,13 @@ func (ct *EVMChainType) RunHealthCheck(resolved chain.ResolvedChains) error { // is true, an invalid or default-sentinel key is a hard error. Otherwise a // sentinel key is used with a warning so non-broadcast simulations can run. func (ct *EVMChainType) ResolveKey(creSettings *settings.Settings, broadcast bool) (interface{}, error) { - pk, err := crypto.HexToECDSA(creSettings.User.EthPrivateKey) + pk, err := crypto.HexToECDSA(creSettings.User.PrivateKey(settings.EVM)) if err != nil { // If the user explicitly set a key that looks like a hex string but is // malformed (wrong length, invalid chars), always error with guidance. // Skip placeholder values like "your-eth-private-key" from the default .env template. - if creSettings.User.EthPrivateKey != "" && isHexString(creSettings.User.EthPrivateKey) { + evmKey := creSettings.User.PrivateKey(settings.EVM) + if evmKey != "" && isHexString(evmKey) { return nil, fmt.Errorf( "invalid private key: expected 64 hex characters (256 bits), got %d characters.\n\n"+ "The CLI reads CRE_ETH_PRIVATE_KEY from your .env file or system environment.\n"+ @@ -235,7 +233,7 @@ func (ct *EVMChainType) ResolveKey(creSettings *settings.Settings, broadcast boo " • Pasted an Ethereum address (40 chars) instead of a private key (64 chars)\n"+ " • Value has extra quotes — use CRE_ETH_PRIVATE_KEY=abc123... without wrapping quotes\n"+ " • Key was truncated during copy-paste", - len(creSettings.User.EthPrivateKey)) + len(evmKey)) } if broadcast { return nil, fmt.Errorf( diff --git a/cmd/workflow/simulate/chain/evm/chaintype_test.go b/cmd/workflow/simulate/chain/evm/chaintype_test.go index b02b267c..85871135 100644 --- a/cmd/workflow/simulate/chain/evm/chaintype_test.go +++ b/cmd/workflow/simulate/chain/evm/chaintype_test.go @@ -163,7 +163,7 @@ func TestEVMChainType_ResolveKey(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { ct := newEVMChainType() - s := &settings.Settings{User: settings.UserSettings{EthPrivateKey: tt.pk}} + s := &settings.Settings{User: settings.UserSettings{PrivateKeys: map[string]string{settings.EVM.Name: tt.pk}}} var got interface{} var err error @@ -261,6 +261,19 @@ func TestEVMChainType_RegisterCapabilities_WrongClientType(t *testing.T) { assert.Contains(t, err.Error(), "client for selector 1 is not *ethclient.Client") } +func TestEVMChainType_RegisterCapabilities_WrongPrivateKeyType(t *testing.T) { + t.Parallel() + ct := newEVMChainType() + cfg := chain.CapabilityConfig{ + Clients: map[uint64]chain.ChainClient{}, + Forwarders: map[uint64]string{}, + PrivateKey: "not-an-ecdsa-key", + } + _, err := ct.RegisterCapabilities(context.Background(), cfg) + require.Error(t, err) + assert.Contains(t, err.Error(), "private key is not *ecdsa.PrivateKey") +} + // With no clients the caps should still construct, no type-assertion error. func TestEVMChainType_RegisterCapabilities_NoClients_ConstructsEmpty(t *testing.T) { t.Parallel() diff --git a/cmd/workflow/simulate/chain/evm/limited_capabilities.go b/cmd/workflow/simulate/chain/evm/limited_capabilities.go index b7b50e02..f46e3282 100644 --- a/cmd/workflow/simulate/chain/evm/limited_capabilities.go +++ b/cmd/workflow/simulate/chain/evm/limited_capabilities.go @@ -13,42 +13,30 @@ import ( "github.com/smartcontractkit/cre-cli/cmd/workflow/simulate/chain" ) -// EVMChainLimits is the EVM-scoped limit contract LimitedEVMChain enforces. -// It extends chain.Limits with EVM-specific accessors (e.g. gas limit) so -// non-EVM chain types cannot accidentally depend on EVM semantics. -type EVMChainLimits interface { - chain.Limits - ChainWriteGasLimit() uint64 -} - // LimitedEVMChain wraps an evmserver.ClientCapability and enforces chain write -// report size and gas limits. +// report size and gas limits. Zero-value chain.Limits disables enforcement. type LimitedEVMChain struct { inner evmserver.ClientCapability - limits EVMChainLimits + limits chain.Limits } var _ evmserver.ClientCapability = (*LimitedEVMChain)(nil) -func NewLimitedEVMChain(inner evmserver.ClientCapability, limits EVMChainLimits) *LimitedEVMChain { +func NewLimitedEVMChain(inner evmserver.ClientCapability, limits chain.Limits) *LimitedEVMChain { return &LimitedEVMChain{inner: inner, limits: limits} } func (l *LimitedEVMChain) WriteReport(ctx context.Context, metadata commonCap.RequestMetadata, input *evmcappb.WriteReportRequest) (*commonCap.ResponseAndMetadata[*evmcappb.WriteReportReply], caperrors.Error) { - // Check report size - reportLimit := l.limits.ChainWriteReportSizeLimit() - if reportLimit > 0 && input.Report != nil && len(input.Report.RawReport) > reportLimit { + if l.limits.ReportSize > 0 && input.Report != nil && len(input.Report.RawReport) > l.limits.ReportSize { return nil, caperrors.NewPublicUserError( - fmt.Errorf("simulation limit exceeded: chain write report size %d bytes exceeds limit of %d bytes", len(input.Report.RawReport), reportLimit), + fmt.Errorf("simulation limit exceeded: chain write report size %d bytes exceeds limit of %d bytes", len(input.Report.RawReport), l.limits.ReportSize), caperrors.ResourceExhausted, ) } - // Check gas limit - gasLimit := l.limits.ChainWriteGasLimit() - if gasLimit > 0 && input.GasConfig != nil && input.GasConfig.GasLimit > gasLimit { + if l.limits.GasLimit > 0 && input.GasConfig != nil && input.GasConfig.GasLimit > l.limits.GasLimit { return nil, caperrors.NewPublicUserError( - fmt.Errorf("simulation limit exceeded: EVM gas limit %d exceeds maximum of %d", input.GasConfig.GasLimit, gasLimit), + fmt.Errorf("simulation limit exceeded: EVM gas limit %d exceeds maximum of %d", input.GasConfig.GasLimit, l.limits.GasLimit), caperrors.ResourceExhausted, ) } diff --git a/cmd/workflow/simulate/chain/evm/limited_capabilities_test.go b/cmd/workflow/simulate/chain/evm/limited_capabilities_test.go index 362a3bb4..8b3eb916 100644 --- a/cmd/workflow/simulate/chain/evm/limited_capabilities_test.go +++ b/cmd/workflow/simulate/chain/evm/limited_capabilities_test.go @@ -13,15 +13,9 @@ import ( evmserver "github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/evm/server" "github.com/smartcontractkit/chainlink-common/pkg/types/core" sdkpb "github.com/smartcontractkit/chainlink-protos/cre/go/sdk" -) - -type stubEVMLimits struct { - reportSizeLimit int - gasLimit uint64 -} -func (s *stubEVMLimits) ChainWriteReportSizeLimit() int { return s.reportSizeLimit } -func (s *stubEVMLimits) ChainWriteGasLimit() uint64 { return s.gasLimit } + "github.com/smartcontractkit/cre-cli/cmd/workflow/simulate/chain" +) type evmCapabilityBaseStub struct{} @@ -94,7 +88,7 @@ func (s *evmClientCapabilityStub) ChainSelector() uint64 { return 0 } func TestLimitedEVMChainWriteReportRejectsOversizedReport(t *testing.T) { t.Parallel() - limits := &stubEVMLimits{reportSizeLimit: 4} + limits := chain.Limits{ReportSize: 4} inner := &evmClientCapabilityStub{} wrapper := NewLimitedEVMChain(inner, limits) @@ -110,7 +104,7 @@ func TestLimitedEVMChainWriteReportRejectsOversizedReport(t *testing.T) { func TestLimitedEVMChainWriteReportRejectsOversizedGasLimit(t *testing.T) { t.Parallel() - limits := &stubEVMLimits{gasLimit: 10} + limits := chain.Limits{GasLimit: 10} inner := &evmClientCapabilityStub{} wrapper := NewLimitedEVMChain(inner, limits) @@ -126,7 +120,7 @@ func TestLimitedEVMChainWriteReportRejectsOversizedGasLimit(t *testing.T) { func TestLimitedEVMChainWriteReportDelegatesOnBoundaryValues(t *testing.T) { t.Parallel() - limits := &stubEVMLimits{reportSizeLimit: 4, gasLimit: 10} + limits := chain.Limits{ReportSize: 4, GasLimit: 10} input := &evmcappb.WriteReportRequest{ Report: &sdkpb.ReportResponse{RawReport: []byte("1234")}, @@ -147,3 +141,43 @@ func TestLimitedEVMChainWriteReportDelegatesOnBoundaryValues(t *testing.T) { assert.Same(t, expectedResp, resp) assert.Equal(t, 1, inner.writeReportCalls) } + +func TestLimitedEVMChainWriteReportZeroLimitsDelegate(t *testing.T) { + t.Parallel() + + inner := &evmClientCapabilityStub{} + wrapper := NewLimitedEVMChain(inner, chain.Limits{}) + + _, err := wrapper.WriteReport(context.Background(), commonCap.RequestMetadata{}, &evmcappb.WriteReportRequest{ + Report: &sdkpb.ReportResponse{RawReport: make([]byte, 1_000_000)}, + GasConfig: &evmcappb.GasConfig{GasLimit: 1_000_000_000}, + }) + require.NoError(t, err) + assert.Equal(t, 1, inner.writeReportCalls) +} + +func TestLimitedEVMChainWriteReportNilGasConfigDelegates(t *testing.T) { + t.Parallel() + + inner := &evmClientCapabilityStub{} + wrapper := NewLimitedEVMChain(inner, chain.Limits{ReportSize: 100, GasLimit: 10}) + + _, err := wrapper.WriteReport(context.Background(), commonCap.RequestMetadata{}, &evmcappb.WriteReportRequest{ + Report: &sdkpb.ReportResponse{RawReport: []byte("x")}, + }) + require.NoError(t, err) + assert.Equal(t, 1, inner.writeReportCalls) +} + +func TestLimitedEVMChainWriteReportNilReportDelegates(t *testing.T) { + t.Parallel() + + inner := &evmClientCapabilityStub{} + wrapper := NewLimitedEVMChain(inner, chain.Limits{ReportSize: 100, GasLimit: 100}) + + _, err := wrapper.WriteReport(context.Background(), commonCap.RequestMetadata{}, &evmcappb.WriteReportRequest{ + GasConfig: &evmcappb.GasConfig{GasLimit: 50}, + }) + require.NoError(t, err) + assert.Equal(t, 1, inner.writeReportCalls) +} diff --git a/cmd/workflow/simulate/chain/evm/limits.go b/cmd/workflow/simulate/chain/evm/limits.go new file mode 100644 index 00000000..155d1f79 --- /dev/null +++ b/cmd/workflow/simulate/chain/evm/limits.go @@ -0,0 +1,14 @@ +package evm + +import ( + "github.com/smartcontractkit/chainlink-common/pkg/settings/cresettings" + + "github.com/smartcontractkit/cre-cli/cmd/workflow/simulate/chain" +) + +func ExtractLimits(w *cresettings.Workflows) chain.Limits { + return chain.Limits{ + ReportSize: int(w.ChainWrite.EVM.ReportSizeLimit.DefaultValue), + GasLimit: w.ChainWrite.EVM.GasLimit.Default.DefaultValue, + } +} diff --git a/cmd/workflow/simulate/chain/evm/limits_test.go b/cmd/workflow/simulate/chain/evm/limits_test.go new file mode 100644 index 00000000..4df914bc --- /dev/null +++ b/cmd/workflow/simulate/chain/evm/limits_test.go @@ -0,0 +1,17 @@ +package evm + +import ( + "testing" + + "github.com/stretchr/testify/assert" + + "github.com/smartcontractkit/chainlink-common/pkg/settings/cresettings" +) + +func TestExtractLimitsFromDefault(t *testing.T) { + t.Parallel() + w := cresettings.Default.PerWorkflow + lim := ExtractLimits(&w) + assert.Equal(t, 5_000, lim.ReportSize) + assert.Equal(t, uint64(5_000_000), lim.GasLimit) +} diff --git a/cmd/workflow/simulate/chain/types.go b/cmd/workflow/simulate/chain/types.go index 12f8c1cb..fdc52bab 100644 --- a/cmd/workflow/simulate/chain/types.go +++ b/cmd/workflow/simulate/chain/types.go @@ -2,6 +2,7 @@ package chain import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/settings/cresettings" "github.com/smartcontractkit/chainlink/v2/core/capabilities" ) @@ -15,14 +16,6 @@ type ChainConfig struct { Forwarder string // chain-type-specific forwarding address } -// Limits exposes the chain-write limits that every chain type's capability -// enforcement layer needs. Chain-type-specific accessors (e.g. EVM gas limit) -// live on chain-type-scoped extension interfaces in the family package so -// non-EVM chain types cannot accidentally depend on EVM semantics. -type Limits interface { - ChainWriteReportSizeLimit() int -} - // ResolvedChains is the result of ChainType.ResolveClients: the RPC clients, // forwarders, and any chain-type-agnostic metadata later interface methods // (e.g. RunHealthCheck) depend on. @@ -35,6 +28,13 @@ type ResolvedChains struct { ExperimentalSelectors map[uint64]bool } +// Limits is the common per-family limits contract enforced by the +// LimitedChain wrappers. +type Limits struct { + ReportSize int + GasLimit uint64 +} + // CapabilityConfig holds everything a chain type needs to register capabilities. type CapabilityConfig struct { Registry *capabilities.Registry @@ -42,7 +42,7 @@ type CapabilityConfig struct { Forwarders map[uint64]string PrivateKey interface{} // chain-type-specific key type; EVM uses *ecdsa.PrivateKey Broadcast bool - Limits Limits // nil disables limit enforcement + Limits *cresettings.Workflows // nil disables enforcement Logger logger.Logger } diff --git a/cmd/workflow/simulate/limits.go b/cmd/workflow/simulate/limits.go index d4b0cfbb..bc05bb23 100644 --- a/cmd/workflow/simulate/limits.go +++ b/cmd/workflow/simulate/limits.go @@ -94,6 +94,12 @@ func applyEngineLimits(cfg *cresettings.Workflows, limits *SimulationLimits) { cfg.HTTPTrigger = src.HTTPTrigger cfg.LogTrigger = src.LogTrigger + //ChainWrite limits - NOTE these are not applied here, but allows flexibility in the future if we want engine to control limits + cfg.ChainWrite.EVM.ReportSizeLimit = src.ChainWrite.EVM.ReportSizeLimit + cfg.ChainWrite.EVM.GasLimit = src.ChainWrite.EVM.GasLimit + cfg.ChainWrite.Aptos.ReportSizeLimit = src.ChainWrite.Aptos.ReportSizeLimit + cfg.ChainWrite.Aptos.GasLimit = src.ChainWrite.Aptos.GasLimit + // NOTE: ChainAllowed is NOT overridden — simulation keeps allow-all } @@ -103,6 +109,7 @@ func disableEngineLimits(cfg *cresettings.Workflows) { maxInt := settings.Setting[int]{DefaultValue: math.MaxInt32} maxSize := settings.Setting[config.Size]{DefaultValue: math.MaxInt32} maxDuration := settings.Setting[time.Duration]{DefaultValue: 24 * time.Hour} + maxGas := settings.Setting[uint64]{DefaultValue: math.MaxUint64} // Execution limits cfg.ExecutionTimeout = maxDuration @@ -149,9 +156,12 @@ func disableEngineLimits(cfg *cresettings.Workflows) { cfg.Consensus.CallLimit = maxInt cfg.Consensus.ObservationSizeLimit = maxSize - // ChainWrite limits + // ChainWrite limits - NOTE these are not applied here, but allows flexibility in the future if we want engine to control limits cfg.ChainWrite.TargetsLimit = maxInt - cfg.ChainWrite.ReportSizeLimit = maxSize + cfg.ChainWrite.EVM.ReportSizeLimit = maxSize + cfg.ChainWrite.EVM.GasLimit.Default = maxGas + cfg.ChainWrite.Aptos.ReportSizeLimit = maxSize + cfg.ChainWrite.Aptos.GasLimit.Default = maxGas // ChainRead limits cfg.ChainRead.CallLimit = maxInt @@ -186,16 +196,26 @@ func (l *SimulationLimits) ConsensusObservationSizeLimit() int { return int(l.Workflows.Consensus.ObservationSizeLimit.DefaultValue) } -// ChainWriteReportSizeLimit returns the chain write report size limit in bytes. -func (l *SimulationLimits) ChainWriteReportSizeLimit() int { - return int(l.Workflows.ChainWrite.ReportSizeLimit.DefaultValue) +// EVMChainWriteReportSizeLimit returns the EVM chain write report size limit in bytes. +func (l *SimulationLimits) EVMChainWriteReportSizeLimit() int { + return int(l.Workflows.ChainWrite.EVM.ReportSizeLimit.DefaultValue) +} + +// AptosChainWriteReportSizeLimit returns the Aptos chain write report size limit in bytes. +func (l *SimulationLimits) AptosChainWriteReportSizeLimit() int { + return int(l.Workflows.ChainWrite.Aptos.ReportSizeLimit.DefaultValue) } -// ChainWriteGasLimit returns the default EVM gas limit. -func (l *SimulationLimits) ChainWriteGasLimit() uint64 { +// EVMChainWriteGasLimit returns the default EVM chain write gas limit. +func (l *SimulationLimits) EVMChainWriteGasLimit() uint64 { return l.Workflows.ChainWrite.EVM.GasLimit.Default.DefaultValue } +// AptosChainWriteGasLimit returns the default Aptos chain write gas limit. +func (l *SimulationLimits) AptosChainWriteGasLimit() uint64 { + return l.Workflows.ChainWrite.Aptos.GasLimit.Default.DefaultValue +} + // WASMBinarySize returns the WASM binary size limit in bytes. func (l *SimulationLimits) WASMBinarySize() int { return int(l.Workflows.WASMBinarySizeLimit.DefaultValue) @@ -210,7 +230,7 @@ func (l *SimulationLimits) WASMCompressedBinarySize() int { func (l *SimulationLimits) LimitsSummary() string { w := &l.Workflows return fmt.Sprintf( - "HTTP: req=%s resp=%s timeout=%s | ConfHTTP: req=%s resp=%s timeout=%s | Consensus obs=%s | ChainWrite report=%s gas=%d | WASM binary=%s compressed=%s", + "HTTP: req=%s resp=%s timeout=%s | ConfHTTP: req=%s resp=%s timeout=%s | Consensus obs=%s | ChainWrite evm_report=%s evm_gas=%d aptos_report=%s aptos_gas=%d | WASM binary=%s compressed=%s", w.HTTPAction.RequestSizeLimit.DefaultValue, w.HTTPAction.ResponseSizeLimit.DefaultValue, w.HTTPAction.ConnectionTimeout.DefaultValue, @@ -218,8 +238,10 @@ func (l *SimulationLimits) LimitsSummary() string { w.ConfidentialHTTP.ResponseSizeLimit.DefaultValue, w.ConfidentialHTTP.ConnectionTimeout.DefaultValue, w.Consensus.ObservationSizeLimit.DefaultValue, - w.ChainWrite.ReportSizeLimit.DefaultValue, + w.ChainWrite.EVM.ReportSizeLimit.DefaultValue, w.ChainWrite.EVM.GasLimit.Default.DefaultValue, + w.ChainWrite.Aptos.ReportSizeLimit.DefaultValue, + w.ChainWrite.Aptos.GasLimit.Default.DefaultValue, w.WASMBinarySizeLimit.DefaultValue, w.WASMCompressedBinarySizeLimit.DefaultValue, ) diff --git a/cmd/workflow/simulate/limits.json b/cmd/workflow/simulate/limits.json index 35df2125..561eb429 100644 --- a/cmd/workflow/simulate/limits.json +++ b/cmd/workflow/simulate/limits.json @@ -32,13 +32,19 @@ }, "ChainWrite": { "TargetsLimit": "10", - "ReportSizeLimit": "5kb", "EVM": { - "TransactionGasLimit": "5000000", + "ReportSizeLimit": "5kb", "GasLimit": { "Default": "5000000", "Values": {} } + }, + "Aptos": { + "ReportSizeLimit": "5kb", + "GasLimit": { + "Default": "2000000", + "Values": {} + } } }, "ChainRead": { diff --git a/cmd/workflow/simulate/limits_test.go b/cmd/workflow/simulate/limits_test.go index d33d9cc4..04ed21d2 100644 --- a/cmd/workflow/simulate/limits_test.go +++ b/cmd/workflow/simulate/limits_test.go @@ -30,8 +30,10 @@ func TestDefaultLimitsAndExportDefaultLimitsJSON(t *testing.T) { assert.Equal(t, 10_000, limits.ConfHTTPRequestSizeLimit()) assert.Equal(t, 100_000, limits.ConfHTTPResponseSizeLimit()) assert.Equal(t, 25_000, limits.ConsensusObservationSizeLimit()) - assert.Equal(t, 5_000, limits.ChainWriteReportSizeLimit()) - assert.Equal(t, uint64(5_000_000), limits.ChainWriteGasLimit()) + assert.Equal(t, 5_000, limits.EVMChainWriteReportSizeLimit()) + assert.Equal(t, 5_000, limits.AptosChainWriteReportSizeLimit()) + assert.Equal(t, uint64(5_000_000), limits.EVMChainWriteGasLimit()) + assert.Equal(t, uint64(2_000_000), limits.AptosChainWriteGasLimit()) assert.Equal(t, 100_000_000, limits.WASMBinarySize()) assert.Equal(t, 20_000_000, limits.WASMCompressedBinarySize()) assert.Equal(t, 10, limits.Workflows.ExecutionConcurrencyLimit.DefaultValue) @@ -49,12 +51,11 @@ func TestLoadLimitsParsesCustomFileAndPreservesDefaultsForUnsetFields(t *testing "ConnectionTimeout": "2s" }, "ChainWrite": { - "ReportSizeLimit": "9kb", - "EVM": { - "GasLimit": { - "Default": "123" - } - } + "EVM": {"ReportSizeLimit": "9kb", "GasLimit": {"Default": "1234567"}}, + "Aptos": {"ReportSizeLimit": "11kb", "GasLimit": {"Default": "7654321"}} + }, + "CRONTrigger": { + "FastestScheduleInterval": "45s" } }`) @@ -63,8 +64,11 @@ func TestLoadLimitsParsesCustomFileAndPreservesDefaultsForUnsetFields(t *testing assert.Equal(t, 7_000, limits.HTTPRequestSizeLimit()) assert.Equal(t, 100_000, limits.HTTPResponseSizeLimit(), "unset values should keep embedded defaults") - assert.Equal(t, 9_000, limits.ChainWriteReportSizeLimit()) - assert.Equal(t, uint64(123), limits.ChainWriteGasLimit()) + assert.Equal(t, 9_000, limits.EVMChainWriteReportSizeLimit()) + assert.Equal(t, 11_000, limits.AptosChainWriteReportSizeLimit()) + assert.Equal(t, uint64(1_234_567), limits.EVMChainWriteGasLimit()) + assert.Equal(t, uint64(7_654_321), limits.AptosChainWriteGasLimit()) + assert.Equal(t, 45*time.Second, limits.Workflows.CRONTrigger.FastestScheduleInterval.DefaultValue) assert.Equal(t, 2*time.Second, limits.Workflows.HTTPAction.ConnectionTimeout.DefaultValue) } @@ -98,7 +102,10 @@ func TestResolveLimitsHandlesAllSupportedModes(t *testing.T) { baseline, err := DefaultLimits() require.NoError(t, err) assert.Equal(t, baseline.HTTPRequestSizeLimit(), defaultLimits.HTTPRequestSizeLimit()) - assert.Equal(t, baseline.ChainWriteGasLimit(), defaultLimits.ChainWriteGasLimit()) + assert.Equal(t, baseline.EVMChainWriteReportSizeLimit(), defaultLimits.EVMChainWriteReportSizeLimit()) + assert.Equal(t, baseline.AptosChainWriteReportSizeLimit(), defaultLimits.AptosChainWriteReportSizeLimit()) + assert.Equal(t, baseline.EVMChainWriteGasLimit(), defaultLimits.EVMChainWriteGasLimit()) + assert.Equal(t, baseline.AptosChainWriteGasLimit(), defaultLimits.AptosChainWriteGasLimit()) path := writeLimitsFile(t, `{"Consensus":{"ObservationSizeLimit":"2kb"}}`) customLimits, err := ResolveLimits(path) @@ -133,6 +140,10 @@ func TestApplyEngineLimitsCopiesSupportedFieldsAndPreservesChainAllowed(t *testi limits.Workflows.LogEventLimit.DefaultValue = 25 limits.Workflows.ChainRead.CallLimit.DefaultValue = 3 limits.Workflows.ChainWrite.TargetsLimit.DefaultValue = 4 + limits.Workflows.ChainWrite.EVM.ReportSizeLimit.DefaultValue = 9_000 + limits.Workflows.ChainWrite.EVM.GasLimit.Default.DefaultValue = 1_234_567 + limits.Workflows.ChainWrite.Aptos.ReportSizeLimit.DefaultValue = 11_000 + limits.Workflows.ChainWrite.Aptos.GasLimit.Default.DefaultValue = 7_654_321 limits.Workflows.Consensus.CallLimit.DefaultValue = 5 limits.Workflows.HTTPAction.CallLimit.DefaultValue = 6 limits.Workflows.ConfidentialHTTP.CallLimit.DefaultValue = 7 @@ -161,6 +172,10 @@ func TestApplyEngineLimitsCopiesSupportedFieldsAndPreservesChainAllowed(t *testi assert.Equal(t, 25, cfg.LogEventLimit.DefaultValue) assert.Equal(t, 3, cfg.ChainRead.CallLimit.DefaultValue) assert.Equal(t, 4, cfg.ChainWrite.TargetsLimit.DefaultValue) + assert.Equal(t, 9_000, int(cfg.ChainWrite.EVM.ReportSizeLimit.DefaultValue)) + assert.Equal(t, uint64(1_234_567), cfg.ChainWrite.EVM.GasLimit.Default.DefaultValue) + assert.Equal(t, 11_000, int(cfg.ChainWrite.Aptos.ReportSizeLimit.DefaultValue)) + assert.Equal(t, uint64(7_654_321), cfg.ChainWrite.Aptos.GasLimit.Default.DefaultValue) assert.Equal(t, 5, cfg.Consensus.CallLimit.DefaultValue) assert.Equal(t, 6, cfg.HTTPAction.CallLimit.DefaultValue) assert.Equal(t, 7, cfg.ConfidentialHTTP.CallLimit.DefaultValue) @@ -176,6 +191,6 @@ func TestSimulationLimitsSummaryIncludesKeyLimitValues(t *testing.T) { assert.Contains(t, summary, "HTTP: req=10kb resp=100kb timeout=10s") assert.Contains(t, summary, "ConfHTTP: req=10kb resp=100kb timeout=10s") assert.Contains(t, summary, "Consensus obs=25kb") - assert.Contains(t, summary, "ChainWrite report=5kb gas=5000000") + assert.Contains(t, summary, "ChainWrite evm_report=5kb evm_gas=5000000 aptos_report=5kb aptos_gas=2000000") assert.Contains(t, summary, "WASM binary=100mb compressed=20mb") } diff --git a/cmd/workflow/simulate/simulate.go b/cmd/workflow/simulate/simulate.go index 9f374991..b4c23b27 100644 --- a/cmd/workflow/simulate/simulate.go +++ b/cmd/workflow/simulate/simulate.go @@ -31,7 +31,8 @@ import ( cmdcommon "github.com/smartcontractkit/cre-cli/cmd/common" "github.com/smartcontractkit/cre-cli/cmd/workflow/simulate/chain" - _ "github.com/smartcontractkit/cre-cli/cmd/workflow/simulate/chain/evm" // register EVM chain family via package init + _ "github.com/smartcontractkit/cre-cli/cmd/workflow/simulate/chain/aptos" // register Aptos chain family via package init + _ "github.com/smartcontractkit/cre-cli/cmd/workflow/simulate/chain/evm" // register EVM chain family via package init "github.com/smartcontractkit/cre-cli/internal/constants" "github.com/smartcontractkit/cre-cli/internal/credentials" "github.com/smartcontractkit/cre-cli/internal/runtime" @@ -95,7 +96,7 @@ func New(runtimeContext *runtime.Context) *cobra.Command { } simulateCmd.Flags().BoolP("engine-logs", "g", false, "Enable non-fatal engine logging") - simulateCmd.Flags().Bool("broadcast", false, "Broadcast transactions to the EVM (default: false)") + simulateCmd.Flags().Bool("broadcast", false, "Broadcast transactions to configured chains (default: false)") simulateCmd.Flags().String("wasm", "", "Path or URL to a pre-built WASM binary (skips compilation)") simulateCmd.Flags().String("config", "", "Override the config file path from workflow.yaml") simulateCmd.Flags().Bool("no-config", false, "Simulate without a config file") @@ -473,11 +474,10 @@ func run( } srvcs = append(srvcs, manualTriggerCaps.ManualCronTrigger, manualTriggerCaps.ManualHTTPTrigger) - // Only set Limits when non-nil to avoid the typed-nil interface trap - // (a nil *SimulationLimits boxed into chain.Limits compares != nil). - var capLimits chain.Limits + // nil capLimits disables enforcement. + var capLimits *cresettings.Workflows if simLimits != nil { - capLimits = simLimits + capLimits = &simLimits.Workflows } // Register chain-type-specific capabilities diff --git a/cmd/workflow/simulate/simulate_test.go b/cmd/workflow/simulate/simulate_test.go index 1d24423a..b6c87a95 100644 --- a/cmd/workflow/simulate/simulate_test.go +++ b/cmd/workflow/simulate/simulate_test.go @@ -72,8 +72,8 @@ func TestBlankWorkflowSimulation(t *testing.T) { Settings: &settings.Settings{ Workflow: workflowSettings, User: settings.UserSettings{ - TargetName: "staging-settings", - EthPrivateKey: "88888845d8761ca4a8cefb324c89702f12114ffbd0c47222f12aac0ad6538888", + TargetName: "staging-settings", + PrivateKeys: map[string]string{settings.EVM.Name: "88888845d8761ca4a8cefb324c89702f12114ffbd0c47222f12aac0ad6538888"}, }, }, } @@ -125,7 +125,7 @@ func createSimulateTestSettings(workflowName, workflowPath, configPath string) * }, }, User: settings.UserSettings{ - EthPrivateKey: "88888845d8761ca4a8cefb324c89702f12114ffbd0c47222f12aac0ad6538888", + PrivateKeys: map[string]string{settings.EVM.Name: "88888845d8761ca4a8cefb324c89702f12114ffbd0c47222f12aac0ad6538888"}, }, } } @@ -446,7 +446,7 @@ func TestSimulateConfigFlagsMutuallyExclusive(t *testing.T) { Viper: viper.New(), Settings: &settings.Settings{ User: settings.UserSettings{ - EthPrivateKey: "88888845d8761ca4a8cefb324c89702f12114ffbd0c47222f12aac0ad6538888", + PrivateKeys: map[string]string{settings.EVM.Name: "88888845d8761ca4a8cefb324c89702f12114ffbd0c47222f12aac0ad6538888"}, }, }, } diff --git a/docs/cre_workflow_simulate.md b/docs/cre_workflow_simulate.md index 8e95a535..158240a4 100644 --- a/docs/cre_workflow_simulate.md +++ b/docs/cre_workflow_simulate.md @@ -19,7 +19,7 @@ cre workflow simulate ./my-workflow ### Options ``` - --broadcast Broadcast transactions to the EVM (default: false) + --broadcast Broadcast transactions to configured chains (default: false) --config string Override the config file path from workflow.yaml --default-config Use the config path from workflow.yaml settings (default behavior) -g, --engine-logs Enable non-fatal engine logging diff --git a/go.mod b/go.mod index a944ddc9..5fe87fbf 100644 --- a/go.mod +++ b/go.mod @@ -72,7 +72,7 @@ require ( github.com/VictoriaMetrics/fastcache v1.13.0 // indirect github.com/XSAM/otelsql v0.37.0 // indirect github.com/apache/arrow-go/v18 v18.3.1 // indirect - github.com/aptos-labs/aptos-go-sdk v1.12.1 // indirect + github.com/aptos-labs/aptos-go-sdk v1.12.1 github.com/atombender/go-jsonschema v0.16.1-0.20240916205339-a74cd4e2851c // indirect github.com/atotto/clipboard v0.1.4 // indirect github.com/avast/retry-go v3.0.0+incompatible // indirect @@ -310,7 +310,7 @@ require ( github.com/shopspring/decimal v1.4.0 // indirect github.com/sigurn/crc16 v0.0.0-20211026045750-20ab5afb07e3 // indirect github.com/smartcontractkit/ccip-owner-contracts v0.1.0 // indirect - github.com/smartcontractkit/chainlink-aptos v0.0.0-20260430175646-295a7f9a1500 // indirect + github.com/smartcontractkit/chainlink-aptos v0.0.0-20260430175646-295a7f9a1500 github.com/smartcontractkit/chainlink-automation v0.8.1 // indirect github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20260428205619-2db1389501a1 // indirect github.com/smartcontractkit/chainlink-ccip/chains/evm v0.0.0-20260428205619-2db1389501a1 // indirect diff --git a/internal/settings/settings.go b/internal/settings/settings.go index a36b611b..1344cd63 100644 --- a/internal/settings/settings.go +++ b/internal/settings/settings.go @@ -12,13 +12,37 @@ import ( "github.com/spf13/cobra" "github.com/spf13/viper" + corekeys "github.com/smartcontractkit/chainlink-common/keystore/corekeys" + "github.com/smartcontractkit/cre-cli/internal/ui" ) -// sensitive information (not in configuration file) -const ( - EthPrivateKeyEnvVar = "CRE_ETH_PRIVATE_KEY" - CreTargetEnvVar = "CRE_TARGET" +const CreTargetEnvVar = "CRE_TARGET" + +// ChainType describes a chain family and the per-family settings the CLI +// loads from the environment. Add a family by appending to AllChainTypes. +type ChainType struct { + Name string + PrivateKeyEnv string +} + +var ( + EVM = ChainType{ + Name: string(corekeys.EVM), + PrivateKeyEnv: "CRE_ETH_PRIVATE_KEY", + } + Aptos = ChainType{ + Name: string(corekeys.Aptos), + PrivateKeyEnv: "CRE_APTOS_PRIVATE_KEY", + } + + AllChainTypes = []ChainType{EVM, Aptos} +) + +// Backwards-compat aliases; prefer EVM.PrivateKeyEnv / Aptos.PrivateKeyEnv. +var ( + EthPrivateKeyEnvVar = EVM.PrivateKeyEnv + AptosPrivateKeyEnvVar = Aptos.PrivateKeyEnv ) // State tracked by LoadEnv / LoadPublicEnv so downstream code (e.g. build @@ -56,9 +80,16 @@ type Settings struct { // UserSettings stores user-specific configurations. type UserSettings struct { - TargetName string - EthPrivateKey string - EthUrl string + TargetName string + PrivateKeys map[string]string // keyed by ChainType.Name +} + +// PrivateKey returns the signing key for the given chain, or "" if unset. +func (u UserSettings) PrivateKey(f ChainType) string { + if u.PrivateKeys == nil { + return "" + } + return u.PrivateKeys[f.Name] } // New initializes and loads settings from YAML config files and the environment. @@ -101,13 +132,15 @@ func New(logger *zerolog.Logger, v *viper.Viper, cmd *cobra.Command, registryCha return nil, err } - rawPrivKey := v.GetString(EthPrivateKeyEnvVar) - normPrivKey := NormalizeHexKey(rawPrivKey) + privateKeys := make(map[string]string, len(AllChainTypes)) + for _, f := range AllChainTypes { + privateKeys[f.Name] = NormalizeHexKey(v.GetString(f.PrivateKeyEnv)) + } return &Settings{ User: UserSettings{ - EthPrivateKey: normPrivKey, - TargetName: target, + TargetName: target, + PrivateKeys: privateKeys, }, Workflow: workflowSettings, StorageSettings: storageSettings, @@ -181,7 +214,11 @@ func LoadEnv(logger *zerolog.Logger, v *viper.Viper, envPath string) { loadedEnvFilePath = "" loadedEnvVars = nil loadedEnvFilePath, loadedEnvVars = loadEnvFile(logger, envPath) - bindAllVars(v, loadedEnvVars, EthPrivateKeyEnvVar, CreTargetEnvVar) + extras := []string{CreTargetEnvVar} + for _, f := range AllChainTypes { + extras = append(extras, f.PrivateKeyEnv) + } + bindAllVars(v, loadedEnvVars, extras...) } // LoadPublicEnv loads variables from envPath into the process environment diff --git a/internal/settings/settings_generate.go b/internal/settings/settings_generate.go index 1651cbdc..a4fcbdd0 100644 --- a/internal/settings/settings_generate.go +++ b/internal/settings/settings_generate.go @@ -28,9 +28,10 @@ var gitIgnoreTemplateContent string var workflowSettingsTemplateContent string type ProjectEnv struct { - FilePath string - GitHubAPIToken string - EthPrivateKey string + FilePath string + GitHubAPIToken string + EthPrivateKey string + AptosPrivateKey string } func GetDefaultReplacements() map[string]string { @@ -118,8 +119,9 @@ func GenerateProjectEnvFile(workingDirectory string) (string, error) { } replacements := map[string]string{ - "GithubApiToken": "your-github-token", - "EthPrivateKey": "your-eth-private-key", + "GithubApiToken": "your-github-token", + "EthPrivateKey": "your-eth-private-key", + "AptosPrivateKey": "your-aptos-private-key", } if err := GenerateFileFromTemplate(outputPath, ProjectEnvironmentTemplateContent, replacements); err != nil { diff --git a/internal/settings/settings_generate_test.go b/internal/settings/settings_generate_test.go index d612f66e..359428fc 100644 --- a/internal/settings/settings_generate_test.go +++ b/internal/settings/settings_generate_test.go @@ -3,6 +3,7 @@ package settings import ( "os" "path/filepath" + "strings" "testing" "github.com/stretchr/testify/assert" @@ -68,6 +69,21 @@ func TestGetReplacementsWithNetworks(t *testing.T) { assert.Contains(t, repl, "ConfigPathStaging") } +func TestProjectEnvironmentTemplateIncludesAptosPrivateKey(t *testing.T) { + replacements := map[string]string{ + "EthPrivateKey": "eth-key", + "AptosPrivateKey": "aptos-key", + } + + content := ProjectEnvironmentTemplateContent + for key, value := range replacements { + content = strings.ReplaceAll(content, "{{"+key+"}}", value) + } + + assert.Contains(t, content, "CRE_ETH_PRIVATE_KEY=eth-key") + assert.Contains(t, content, "CRE_APTOS_PRIVATE_KEY=aptos-key") +} + func TestPatchProjectRPCs(t *testing.T) { t.Run("patches matching chain URLs", func(t *testing.T) { tmpDir := t.TempDir() diff --git a/internal/settings/settings_get.go b/internal/settings/settings_get.go index 9ddb2d28..5a8f9573 100644 --- a/internal/settings/settings_get.go +++ b/internal/settings/settings_get.go @@ -38,10 +38,11 @@ type RpcEndpoint struct { Url string `mapstructure:"url" yaml:"url"` } -// ExperimentalChain represents an EVM chain not in official chain-selectors. +// ExperimentalChain represents a chain not in official chain-selectors. // Automatically used by the simulator when present in the target's experimental-chains config. -// The ChainSelector is used as the selector key for EVM clients and forwarders. +// ChainType selects the chain family; empty defaults to "evm" for backward compat. type ExperimentalChain struct { + ChainType string `mapstructure:"chain-type" yaml:"chain-type"` ChainSelector uint64 `mapstructure:"chain-selector" yaml:"chain-selector"` RPCURL string `mapstructure:"rpc-url" yaml:"rpc-url"` Forwarder string `mapstructure:"forwarder" yaml:"forwarder"` @@ -263,15 +264,21 @@ func ChainNameFromSelectorString(raw string) (string, error) { } func GetChainSelectorByChainName(name string) (uint64, error) { - chainID, err := chainSelectors.ChainIdFromName(name) - if err != nil { - return 0, fmt.Errorf("failed to get chain ID from name %q: %w\n Run 'cre workflow supported-chains' to see all valid chain names", name, err) - } - - selector, err := chainSelectors.SelectorFromChainId(chainID) - if err != nil { - return 0, fmt.Errorf("failed to get selector from chain ID %d: %w", chainID, err) + switch { + case strings.HasPrefix(name, chainSelectors.FamilyAptos): + for _, c := range chainSelectors.AptosALL { + if c.Name == name { + return c.Selector, nil + } + } + default: + if chainID, err := chainSelectors.ChainIdFromName(name); err == nil { + selector, err := chainSelectors.SelectorFromChainId(chainID) + if err != nil { + return 0, fmt.Errorf("failed to get selector from chain ID %d: %w", chainID, err) + } + return selector, nil + } } - - return selector, nil + return 0, fmt.Errorf("failed to get chain ID from name %q: chain not found\n Run 'cre workflow supported-chains' to see all valid chain names", name) } diff --git a/internal/settings/settings_test.go b/internal/settings/settings_test.go index 2cbd2c0c..b93b4485 100644 --- a/internal/settings/settings_test.go +++ b/internal/settings/settings_test.go @@ -136,7 +136,7 @@ func TestLoadEnvAndSettings(t *testing.T) { s, err := settings.New(logger, v, cmd, "") require.NoError(t, err) assert.Equal(t, "staging", s.User.TargetName) - assert.Equal(t, "ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80", s.User.EthPrivateKey) + assert.Equal(t, "ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80", s.User.PrivateKey(settings.EVM)) } func TestLoadEnvAndSettingsWithWorkflowSettingsFlag(t *testing.T) { @@ -169,7 +169,7 @@ func TestLoadEnvAndSettingsWithWorkflowSettingsFlag(t *testing.T) { s, err := settings.New(logger, v, cmd, "") require.NoError(t, err) assert.Equal(t, "staging", s.User.TargetName) - assert.Equal(t, "ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80", s.User.EthPrivateKey) + assert.Equal(t, "ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80", s.User.PrivateKey(settings.EVM)) } func TestInlineEnvTakesPrecedenceOverDotEnv(t *testing.T) { @@ -199,7 +199,7 @@ func TestInlineEnvTakesPrecedenceOverDotEnv(t *testing.T) { s, err := settings.New(logger, v, cmd, "") require.NoError(t, err) assert.Equal(t, "staging", s.User.TargetName) - assert.Equal(t, "ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80", s.User.EthPrivateKey) + assert.Equal(t, "ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80", s.User.PrivateKey(settings.EVM)) } func TestLoadEnvAndMergedSettings(t *testing.T) { @@ -241,7 +241,7 @@ func TestLoadEnvAndMergedSettings(t *testing.T) { rpc2 := s.Workflow.RPCs[1] assert.Equal(t, "https://somethingElse.rpc.org", rpc1.Url, "First RPC URL mismatch") assert.Equal(t, "https://something.rpc.org", rpc2.Url, "Second RPC URL mismatch") - assert.Equal(t, "ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80", s.User.EthPrivateKey) + assert.Equal(t, "ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80", s.User.PrivateKey(settings.EVM)) } // helper to build a command with optional --broadcast flag and parse args @@ -340,7 +340,7 @@ func TestOffChainDeploymentRegistryUsesDerivedOwnerWithoutPrivateKey(t *testing. require.NoError(t, err) assert.Equal(t, derived, s.Workflow.UserWorkflowSettings.WorkflowOwnerAddress) assert.Equal(t, constants.WorkflowOwnerTypeOrgDerived, s.Workflow.UserWorkflowSettings.WorkflowOwnerType) - assert.Empty(t, s.User.EthPrivateKey) + assert.Empty(t, s.User.PrivateKey(settings.EVM)) } func TestOffChainDeploymentRegistryMissingDerivedOwnerReturnsError(t *testing.T) { diff --git a/internal/settings/template/.env.tpl b/internal/settings/template/.env.tpl index 0f17f640..3a3ba339 100644 --- a/internal/settings/template/.env.tpl +++ b/internal/settings/template/.env.tpl @@ -6,6 +6,9 @@ # Ethereum private key or 1Password reference (e.g. op://vault/item/field) CRE_ETH_PRIVATE_KEY={{EthPrivateKey}} +# Aptos private key or 1Password reference (32-byte Ed25519 seed hex) +CRE_APTOS_PRIVATE_KEY={{AptosPrivateKey}} + # RPC secret keys — referenced in project.yaml via ${VAR_NAME} syntax. # Example: # CRE_SECRET_RPC_SEPOLIA=my-secret-api-key diff --git a/internal/settings/template/project.yaml.tpl b/internal/settings/template/project.yaml.tpl index 8f894a90..8314980d 100644 --- a/internal/settings/template/project.yaml.tpl +++ b/internal/settings/template/project.yaml.tpl @@ -23,10 +23,11 @@ # # Experimental chains (automatically used by the simulator when present): # Use this for chains not yet in official chain-selectors (e.g., hackathons, new chain integrations). -# In your workflow, reference the chain as evm:ChainSelector:@1.0.0 +# In your workflow, reference the chain as :ChainSelector:@1.0.0 # # experimental-chains: -# - chain-selector: 12345 # The chain selector value +# - chain-type: evm # Chain family +# chain-selector: 12345 # The chain selector value # rpc-url: "https://rpc.example.com" # RPC endpoint URL # forwarder: "0x..." # Forwarder contract address on the chain diff --git a/test/multi_command_flows/workflow_private_registry.go b/test/multi_command_flows/workflow_private_registry.go index 5ab8c3df..1cf7af72 100644 --- a/test/multi_command_flows/workflow_private_registry.go +++ b/test/multi_command_flows/workflow_private_registry.go @@ -883,7 +883,7 @@ func RunPrivateRegistryAuthAndSettingsFinalize(t *testing.T, envPath, blankWorkf s, err := settings.New(logger, v, cmd, "") require.NoError(t, err) require.NotNil(t, s) - require.Empty(t, s.User.EthPrivateKey, "CRE_ETH_PRIVATE_KEY must be absent") + require.Empty(t, s.User.PrivateKey(settings.EVM), "CRE_ETH_PRIVATE_KEY must be absent") require.Equal(t, "reg-test", s.Workflow.UserWorkflowSettings.DeploymentRegistry) require.Empty(t, s.Workflow.UserWorkflowSettings.WorkflowOwnerAddress, "owner is deferred until finalize when deployment-registry is set") require.Empty(t, s.Workflow.UserWorkflowSettings.WorkflowOwnerType) From a973259cd29fc8e0189a1374c1d2ed379870c4d2 Mon Sep 17 00:00:00 2001 From: yashnevatia Date: Tue, 12 May 2026 12:29:30 +0100 Subject: [PATCH 3/9] Validate deps --- .github/workflows/validate-protos-version.yml | 21 ++++++ .github/workflows/validate-sdk-version.yml | 71 +++++++++++++++++++ 2 files changed, 92 insertions(+) create mode 100644 .github/workflows/validate-protos-version.yml create mode 100644 .github/workflows/validate-sdk-version.yml diff --git a/.github/workflows/validate-protos-version.yml b/.github/workflows/validate-protos-version.yml new file mode 100644 index 00000000..0e6ca167 --- /dev/null +++ b/.github/workflows/validate-protos-version.yml @@ -0,0 +1,21 @@ +name: Validate chainlink-protos version + +on: + push: + branches: + - capabilities-development + pull_request: + branches: + - capabilities-development + +jobs: + validate-protos-version: + permissions: + contents: read + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Validate protos version + uses: smartcontractkit/.github/actions/validate-protos-version@e5a68c3ae58d138e4e7d1d2bbc7918e2b51d7161 #v1.0.0 diff --git a/.github/workflows/validate-sdk-version.yml b/.github/workflows/validate-sdk-version.yml new file mode 100644 index 00000000..d1aa8b95 --- /dev/null +++ b/.github/workflows/validate-sdk-version.yml @@ -0,0 +1,71 @@ +name: Validate cre-sdk-go version + +on: + push: + branches: + - capabilities-development + pull_request: + branches: + - capabilities-development + +jobs: + validate-sdk-version: + permissions: + contents: read + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Checkout cre-sdk-go + uses: actions/checkout@v6 + with: + repository: smartcontractkit/cre-sdk-go + ref: capabilities-development + path: .cre-sdk-go + fetch-depth: 0 + persist-credentials: false + + - name: Validate cre-sdk-go versions are from capabilities-development + run: | + failed=0 + found=0 + + # Find all lines in the root go.mod that depend on any cre-sdk-go module. + while IFS= read -r line; do + mod=$(echo "$line" | awk '{print $1}') + echo " parsed module: $mod" + version=$(echo "$line" | awk '{print $2}') + echo " parsed version: $version" + + found=1 + + # Go pseudo-versions end with a commit hash after the last "-". + # e.g. "v0.0.0-20260420204255-a3f3bdd56877" -> "a3f3bdd56877" + commit=${version##*-} + echo " parsed commit: $commit" + + echo "Checking module=$mod version=$version commit=$commit" + + # Verify the commit is reachable from capabilities-development. + if ! git -C .cre-sdk-go merge-base --is-ancestor "$commit" capabilities-development 2>/dev/null; then + echo "::error::$mod commit $commit is NOT on the capabilities-development branch of cre-sdk-go" + failed=1 + else + echo "OK: $mod commit $commit is on capabilities-development" + fi + done < <(grep 'github.com/smartcontractkit/cre-sdk-go' go.mod | grep -v '^//') + + if [[ "$found" -eq 0 ]]; then + echo "::error::No cre-sdk-go dependencies found in go.mod" + exit 1 + fi + + if [[ "$failed" -eq 1 ]]; then + echo "" + echo "One or more cre-sdk-go dependencies reference a commit not on capabilities-development." + exit 1 + fi + + echo "" + echo "All cre-sdk-go versions are from capabilities-development." From bef9e78c96026e7acd10bfc5d0ee3a12cb03f005 Mon Sep 17 00:00:00 2001 From: yashnevatia Date: Tue, 12 May 2026 12:47:03 +0100 Subject: [PATCH 4/9] tidy --- go.mod | 8 ++++---- go.sum | 11 +++++++++++ test/test_project/por_workflow/go.mod | 12 ++++++------ test/test_project/por_workflow/go.sum | 24 ++++++++++++------------ 4 files changed, 33 insertions(+), 22 deletions(-) diff --git a/go.mod b/go.mod index 5fe87fbf..29f3098e 100644 --- a/go.mod +++ b/go.mod @@ -31,8 +31,8 @@ require ( github.com/smartcontractkit/chainlink-protos/workflows/go v0.0.0-20260323124644-faea187e6997 github.com/smartcontractkit/chainlink-testing-framework/seth v1.51.5 github.com/smartcontractkit/chainlink/deployment v0.0.0-20260422181348-efa818697ce5 - github.com/smartcontractkit/chainlink/v2 v2.46.0 - github.com/smartcontractkit/cre-sdk-go v1.5.0 + github.com/smartcontractkit/chainlink/v2 v2.36.1-rc.0 + github.com/smartcontractkit/cre-sdk-go v1.4.1-0.20260330204130-964a5b106d0c github.com/smartcontractkit/cre-sdk-go/capabilities/blockchain/evm v1.0.0-beta.6.0.20260330204130-964a5b106d0c github.com/smartcontractkit/mcms v0.41.1 github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20251120172354-e8ec0386b06c @@ -310,7 +310,7 @@ require ( github.com/shopspring/decimal v1.4.0 // indirect github.com/sigurn/crc16 v0.0.0-20211026045750-20ab5afb07e3 // indirect github.com/smartcontractkit/ccip-owner-contracts v0.1.0 // indirect - github.com/smartcontractkit/chainlink-aptos v0.0.0-20260430175646-295a7f9a1500 + github.com/smartcontractkit/chainlink-aptos v0.0.0-20260511220427-1408ad3b1e69 github.com/smartcontractkit/chainlink-automation v0.8.1 // indirect github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20260428205619-2db1389501a1 // indirect github.com/smartcontractkit/chainlink-ccip/chains/evm v0.0.0-20260428205619-2db1389501a1 // indirect @@ -323,7 +323,7 @@ require ( github.com/smartcontractkit/chainlink-evm/contracts/cre/gobindings v0.0.0-20260403151002-2c91155b5501 // indirect github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-20260423135514-5b1a7565a99c // indirect github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20260423135514-5b1a7565a99c // indirect - github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20260423135514-5b1a7565a99c // indirect + github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20260505202410-b350dca113b4 // indirect github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20260423135514-5b1a7565a99c // indirect github.com/smartcontractkit/chainlink-protos/billing/go v0.0.0-20251024234028-0988426d98f4 // indirect github.com/smartcontractkit/chainlink-protos/job-distributor v0.18.0 // indirect diff --git a/go.sum b/go.sum index f687b0fd..bfbf7161 100644 --- a/go.sum +++ b/go.sum @@ -1223,6 +1223,7 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg= github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is= +github.com/prometheus/prometheus v0.304.2 h1:HhjbaAwet87x8Be19PFI/5W96UMubGy3zt24kayEuh4= github.com/prometheus/prometheus v0.311.2-0.20260410083055-07c6232d159b h1:tjxqNQlYTJzrQrY7HM2SbnxqzuE64vnvlSmSbAvBBDE= github.com/prometheus/prometheus v0.311.2-0.20260410083055-07c6232d159b/go.mod h1:h4Ogksuo6VUZmnm6q/ruKTUzrg9Vvu6u/6O/rQ5xPMg= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= @@ -1309,10 +1310,13 @@ github.com/smartcontractkit/chain-selectors v1.0.98 h1:fuI7CQ1o5cX64eO4/Lvwtfhdp github.com/smartcontractkit/chain-selectors v1.0.98/go.mod h1:qy7whtgG5g+7z0jt0nRyii9bLND9m15NZTzuQPkMZ5w= github.com/smartcontractkit/chainlink-aptos v0.0.0-20260430175646-295a7f9a1500 h1:045jrHCLI+MpeAyByJkyHbEjq0+aTPt04C7+sbsNNtw= github.com/smartcontractkit/chainlink-aptos v0.0.0-20260430175646-295a7f9a1500/go.mod h1:zfE2R7887kiwXkGTHKPe5NBgwhFwIC3pnA2uAxrbvig= +github.com/smartcontractkit/chainlink-aptos v0.0.0-20260511220427-1408ad3b1e69 h1:y/P8GwsRzSnIOvI09RFjMcgI1kZtaBU3NoNbdkIUkao= +github.com/smartcontractkit/chainlink-aptos v0.0.0-20260511220427-1408ad3b1e69/go.mod h1:FEm5fvIQe5O8Qdx6GvQcXsk7rDFpmYdIWXea5i4tpjw= 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.20260428205619-2db1389501a1 h1:p0nFrTYrOQzDhWYm6suaM5CoWiXV5NV7llHnp6/Kn/8= github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20260428205619-2db1389501a1/go.mod h1:1XxxpkgCmG/z6y30yRuVrcxre6zixIVX3xzi706Db/8= +github.com/smartcontractkit/chainlink-ccip/ccv/chains/evm v0.0.0-20260406180811-0ec22f0243a4 h1:b6IxxglkWivZ5nfYdYkHF4w0l2BJyEmSdyMYRm47aB4= github.com/smartcontractkit/chainlink-ccip/ccv/chains/evm v0.0.0-20260408145530-22e2d05695cd h1:Jtw6p5iisjXZyFOcBvWh6PDQKtvryrRU2JMmezdutjo= github.com/smartcontractkit/chainlink-ccip/ccv/chains/evm v0.0.0-20260408145530-22e2d05695cd/go.mod h1:zLqdD2kBX7NsntBneclb2yrHhjFaJdoyA8dK5eimlrE= github.com/smartcontractkit/chainlink-ccip/chains/evm v0.0.0-20260428205619-2db1389501a1 h1:wfiut4oWMcpJmTEl/1ShwMBxwTQEv0wV4/YTma9Otxk= @@ -1321,6 +1325,7 @@ github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260415165642-4 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260415165642-49f23e4d76cc/go.mod h1:gzCVLUlNov/zFXSC7G6zcGkZU1IfNOHaakbAPDe5Woc= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260415165642-49f23e4d76cc h1:War93neyFmv7pzuElZeZC3qc/OfGtLvEXvqL3qeBfM0= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260415165642-49f23e4d76cc/go.mod h1:67YbnoglYD61Pz/jTVCgav9wFq7S35OU8UyQSvPllRw= +github.com/smartcontractkit/chainlink-ccv v0.0.0-20260408181529-b5080e662563 h1:1sYQ2lG3zbAG2vASNF5kLke8DhGk5lNaJirwPDx3Vi4= github.com/smartcontractkit/chainlink-ccv v0.0.2-0.20260428133800-3b1484e8b1fd h1:IMopuENFVS63AerRELdfWo6o60UNUidcldJOxJLmk24= github.com/smartcontractkit/chainlink-ccv v0.0.2-0.20260428133800-3b1484e8b1fd/go.mod h1:SBN8Urnh5sQvrQRbSo1Nr8coWatHg8LZoPw3R/42sho= github.com/smartcontractkit/chainlink-common v0.11.2-0.20260505124104-72181f5345ce h1:eoeTZYsKKgU8DaNm92p56bC8PQ1fjZCRyWzBko/hZdY= @@ -1349,6 +1354,8 @@ github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20260423135514-5b1 github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20260423135514-5b1a7565a99c/go.mod h1:kGprqyjsz6qFNVszOQoHc24wfvCjyipNZFste/3zcbs= github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20260423135514-5b1a7565a99c h1:1VVreRcffo3N3zF1JVtgS+YC4puuj3y0FU0Fta7L3U0= github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20260423135514-5b1a7565a99c/go.mod h1:HG/aei0MgBOpsyRLexdKGtOUO8yjSJO3iUu0Uu8KBm4= +github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20260505202410-b350dca113b4 h1:v/rAtObo9zMpQDnGQ0seaSEqw60JUjowwcNw3DCpVY4= +github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20260505202410-b350dca113b4/go.mod h1:HG/aei0MgBOpsyRLexdKGtOUO8yjSJO3iUu0Uu8KBm4= github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20260423135514-5b1a7565a99c h1:N5cZI93lPH0oYnVSP9dq72QwKnrW0gBpEmx2MI1ermg= github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20260423135514-5b1a7565a99c/go.mod h1:7ketk4ischPQW/JQgmyHz6zdzLUJv1VC29SiSgosydQ= github.com/smartcontractkit/chainlink-protos/billing/go v0.0.0-20251024234028-0988426d98f4 h1:GCzrxDWn3b7jFfEA+WiYRi8CKoegsayiDoJBCjYkneE= @@ -1399,8 +1406,12 @@ github.com/smartcontractkit/chainlink-tron/relayer/gotron-sdk v0.0.5-0.202510141 github.com/smartcontractkit/chainlink-tron/relayer/gotron-sdk v0.0.5-0.20251014143056-a0c6328c91e9/go.mod h1:ea1LESxlSSOgc2zZBqf1RTkXTMthHaspdqUHd7W4lF0= github.com/smartcontractkit/chainlink/deployment v0.0.0-20260422181348-efa818697ce5 h1:5Vh1ulQMReXwg8qgT5by12MqJt+Dc9y3Y/df02QeLuk= github.com/smartcontractkit/chainlink/deployment v0.0.0-20260422181348-efa818697ce5/go.mod h1:pMBypeRoT8Nnb5gbkW6kIs+fBVsc/OzUx2eR9MtyFaw= +github.com/smartcontractkit/chainlink/v2 v2.36.1-rc.0 h1:H6/GFRqI3/pFuc5Nb+GhWPg/Xt8ajfsMkrySm2YoKwE= +github.com/smartcontractkit/chainlink/v2 v2.36.1-rc.0/go.mod h1:x2P+mXAZI6flpxgwrhdLD95IHjSww7YgfRUYsAWUxos= github.com/smartcontractkit/chainlink/v2 v2.46.0 h1:CeILLkUl64Mh39WHe5SmPDw8Fldu8BYI4rJWjveYnuw= github.com/smartcontractkit/chainlink/v2 v2.46.0/go.mod h1:gNJE4C5BxtRggz+EY1B1DbURmRtB9pjHR/q5MttjFlc= +github.com/smartcontractkit/cre-sdk-go v1.4.1-0.20260330204130-964a5b106d0c h1:iwz7ViEyN/4DP/NjcA6L3z0yRa1Isy3mB0+aU4/5460= +github.com/smartcontractkit/cre-sdk-go v1.4.1-0.20260330204130-964a5b106d0c/go.mod h1:yYrQFz1UH7hhRbPO0q4fgo1tfsJNd4yXnI3oCZE0RzM= github.com/smartcontractkit/cre-sdk-go v1.5.0 h1:kepW3QDKARrOOHjXwWAZ9j5KLk6bxLzvi6OMrLsFwVo= github.com/smartcontractkit/cre-sdk-go v1.5.0/go.mod h1:yYrQFz1UH7hhRbPO0q4fgo1tfsJNd4yXnI3oCZE0RzM= github.com/smartcontractkit/cre-sdk-go/capabilities/blockchain/evm v1.0.0-beta.6.0.20260330204130-964a5b106d0c h1:UUhjBBOiJLp6ZiEqRprPBdvAX2IZApwKYEYgthAv0fA= diff --git a/test/test_project/por_workflow/go.mod b/test/test_project/por_workflow/go.mod index c8f6a9f3..60597bab 100644 --- a/test/test_project/por_workflow/go.mod +++ b/test/test_project/por_workflow/go.mod @@ -5,12 +5,12 @@ go 1.25.3 require ( github.com/ethereum/go-ethereum v1.17.0 github.com/shopspring/decimal v1.4.0 - github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260304171818-4962d40dc235 - github.com/smartcontractkit/cre-sdk-go v1.5.0 - github.com/smartcontractkit/cre-sdk-go/capabilities/blockchain/evm v1.0.0-beta.7 - github.com/smartcontractkit/cre-sdk-go/capabilities/networking/confidentialhttp v0.0.0-20260211203328-1f3721436119 - github.com/smartcontractkit/cre-sdk-go/capabilities/networking/http v1.3.0 - github.com/smartcontractkit/cre-sdk-go/capabilities/scheduler/cron v1.3.0 + github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260511222622-3dae6143f38a + github.com/smartcontractkit/cre-sdk-go v1.4.1-0.20260330204130-964a5b106d0c + github.com/smartcontractkit/cre-sdk-go/capabilities/blockchain/evm v1.0.0-beta.6.0.20260330204130-964a5b106d0c + github.com/smartcontractkit/cre-sdk-go/capabilities/networking/confidentialhttp v0.0.0-20260330204130-964a5b106d0c + github.com/smartcontractkit/cre-sdk-go/capabilities/networking/http v1.3.1-0.20260330204130-964a5b106d0c + github.com/smartcontractkit/cre-sdk-go/capabilities/scheduler/cron v1.3.1-0.20260330204130-964a5b106d0c google.golang.org/protobuf v1.36.11 ) diff --git a/test/test_project/por_workflow/go.sum b/test/test_project/por_workflow/go.sum index 00c718cd..4f883aed 100644 --- a/test/test_project/por_workflow/go.sum +++ b/test/test_project/por_workflow/go.sum @@ -178,18 +178,18 @@ github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1 github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= -github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260304171818-4962d40dc235 h1:tWckyqO1Fw/9nTOdUfDgaVzMCSdZTEU7nfpe6kWqNCE= -github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260304171818-4962d40dc235/go.mod h1:Jqt53s27Tr0jDl8mdBXg1xhu6F8Fci8JOuq43tgHOM8= -github.com/smartcontractkit/cre-sdk-go v1.5.0 h1:kepW3QDKARrOOHjXwWAZ9j5KLk6bxLzvi6OMrLsFwVo= -github.com/smartcontractkit/cre-sdk-go v1.5.0/go.mod h1:yYrQFz1UH7hhRbPO0q4fgo1tfsJNd4yXnI3oCZE0RzM= -github.com/smartcontractkit/cre-sdk-go/capabilities/blockchain/evm v1.0.0-beta.7 h1:MmYBEOr+hFJeEUY3N0lD93Qx6NtfGtS6BrOWz5xAW2I= -github.com/smartcontractkit/cre-sdk-go/capabilities/blockchain/evm v1.0.0-beta.7/go.mod h1:VS7CLLJ7GgQP+TxrQ0YCN6Vs9TmnBi9F1dPriEE0TO8= -github.com/smartcontractkit/cre-sdk-go/capabilities/networking/confidentialhttp v0.0.0-20260211203328-1f3721436119 h1:P69M59tBeLevOldspLxedrYNyAu+vtaD6wnpWwhstxM= -github.com/smartcontractkit/cre-sdk-go/capabilities/networking/confidentialhttp v0.0.0-20260211203328-1f3721436119/go.mod h1:KOn3NK4AbtvuMs2oKlNRxL2fACSuuGI114xPqO5igtQ= -github.com/smartcontractkit/cre-sdk-go/capabilities/networking/http v1.3.0 h1:m0OkXuaLtIcYvBrLtxSfygrGtBJvPwaSoANe48434BA= -github.com/smartcontractkit/cre-sdk-go/capabilities/networking/http v1.3.0/go.mod h1:QpLhMGMa//e4G9qMmmCK4NPMcadRBaWC2FDV9hniMrI= -github.com/smartcontractkit/cre-sdk-go/capabilities/scheduler/cron v1.3.0 h1:qBZ4y6qlTOynSpU1QAi2Fgr3tUZQ332b6hit9EVZqkk= -github.com/smartcontractkit/cre-sdk-go/capabilities/scheduler/cron v1.3.0/go.mod h1:Rzhy75vD3FqQo/SV6lypnxIwjWac6IOWzI5BYj3tYMU= +github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260511222622-3dae6143f38a h1:WqCdxqmZIRoen4Cu/4lIiqPwMF3rBCkOYLQ6SdjCCfM= +github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260511222622-3dae6143f38a/go.mod h1:Jqt53s27Tr0jDl8mdBXg1xhu6F8Fci8JOuq43tgHOM8= +github.com/smartcontractkit/cre-sdk-go v1.4.1-0.20260330204130-964a5b106d0c h1:iwz7ViEyN/4DP/NjcA6L3z0yRa1Isy3mB0+aU4/5460= +github.com/smartcontractkit/cre-sdk-go v1.4.1-0.20260330204130-964a5b106d0c/go.mod h1:yYrQFz1UH7hhRbPO0q4fgo1tfsJNd4yXnI3oCZE0RzM= +github.com/smartcontractkit/cre-sdk-go/capabilities/blockchain/evm v1.0.0-beta.6.0.20260330204130-964a5b106d0c h1:UUhjBBOiJLp6ZiEqRprPBdvAX2IZApwKYEYgthAv0fA= +github.com/smartcontractkit/cre-sdk-go/capabilities/blockchain/evm v1.0.0-beta.6.0.20260330204130-964a5b106d0c/go.mod h1:DAC99+IO2/7v1osIUqo7ggpJb2dSGP2PCKcJ/CNdDtg= +github.com/smartcontractkit/cre-sdk-go/capabilities/networking/confidentialhttp v0.0.0-20260330204130-964a5b106d0c h1:tu8RQo/k3S4bW9us7ZSxrCfvN8ecnZixQoXYcozeKCY= +github.com/smartcontractkit/cre-sdk-go/capabilities/networking/confidentialhttp v0.0.0-20260330204130-964a5b106d0c/go.mod h1:KOn3NK4AbtvuMs2oKlNRxL2fACSuuGI114xPqO5igtQ= +github.com/smartcontractkit/cre-sdk-go/capabilities/networking/http v1.3.1-0.20260330204130-964a5b106d0c h1:aUER+UOKiUXOd8GzS1fDlwjRW39saDBhe1pX9J1eMgM= +github.com/smartcontractkit/cre-sdk-go/capabilities/networking/http v1.3.1-0.20260330204130-964a5b106d0c/go.mod h1:QpLhMGMa//e4G9qMmmCK4NPMcadRBaWC2FDV9hniMrI= +github.com/smartcontractkit/cre-sdk-go/capabilities/scheduler/cron v1.3.1-0.20260330204130-964a5b106d0c h1:a3qm6SR2wZOaPI9amRstGhGiNcK9oGc5q1tdriGHGXk= +github.com/smartcontractkit/cre-sdk-go/capabilities/scheduler/cron v1.3.1-0.20260330204130-964a5b106d0c/go.mod h1:Rzhy75vD3FqQo/SV6lypnxIwjWac6IOWzI5BYj3tYMU= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/supranational/blst v0.3.16-0.20250831170142-f48500c1fdbe h1:nbdqkIGOGfUAD54q1s2YBcBz/WcsxCO9HUQ4aGV5hUw= From c544e62b96c57ea8523ebf70d181fde7f99b24c6 Mon Sep 17 00:00:00 2001 From: yashnevatia Date: Tue, 12 May 2026 13:26:04 +0100 Subject: [PATCH 5/9] tidy --- .../simulate/chain/aptos/capabilities.go | 2 +- .../simulate/chain/aptos/chaintype.go | 2 +- cmd/workflow/simulate/chain/aptos/health.go | 2 +- go.mod | 8 +++--- go.sum | 27 ++++++------------- 5 files changed, 15 insertions(+), 26 deletions(-) diff --git a/cmd/workflow/simulate/chain/aptos/capabilities.go b/cmd/workflow/simulate/chain/aptos/capabilities.go index a44358a1..806e7a1d 100644 --- a/cmd/workflow/simulate/chain/aptos/capabilities.go +++ b/cmd/workflow/simulate/chain/aptos/capabilities.go @@ -7,7 +7,7 @@ import ( "github.com/aptos-labs/aptos-go-sdk" "github.com/aptos-labs/aptos-go-sdk/crypto" - aptosfakes "github.com/smartcontractkit/chainlink-aptos/fakes" + aptosfakes "github.com/smartcontractkit/chainlink-aptos/capabilities/fakes" aptosserver "github.com/smartcontractkit/chainlink-common/pkg/capabilities/v2/chain-capabilities/aptos/server" "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink/v2/core/capabilities" diff --git a/cmd/workflow/simulate/chain/aptos/chaintype.go b/cmd/workflow/simulate/chain/aptos/chaintype.go index e5dd0aa7..71b2311c 100644 --- a/cmd/workflow/simulate/chain/aptos/chaintype.go +++ b/cmd/workflow/simulate/chain/aptos/chaintype.go @@ -10,7 +10,7 @@ import ( "github.com/rs/zerolog" "github.com/spf13/viper" - aptosfakes "github.com/smartcontractkit/chainlink-aptos/fakes" + aptosfakes "github.com/smartcontractkit/chainlink-aptos/capabilities/fakes" corekeys "github.com/smartcontractkit/chainlink-common/keystore/corekeys" "github.com/smartcontractkit/chainlink-common/pkg/services" diff --git a/cmd/workflow/simulate/chain/aptos/health.go b/cmd/workflow/simulate/chain/aptos/health.go index 54bc9bd7..028176a1 100644 --- a/cmd/workflow/simulate/chain/aptos/health.go +++ b/cmd/workflow/simulate/chain/aptos/health.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - aptosfakes "github.com/smartcontractkit/chainlink-aptos/fakes" + aptosfakes "github.com/smartcontractkit/chainlink-aptos/capabilities/fakes" "github.com/smartcontractkit/cre-cli/cmd/workflow/simulate/chain" "github.com/smartcontractkit/cre-cli/internal/settings" diff --git a/go.mod b/go.mod index 29f3098e..6705ddca 100644 --- a/go.mod +++ b/go.mod @@ -31,8 +31,8 @@ require ( github.com/smartcontractkit/chainlink-protos/workflows/go v0.0.0-20260323124644-faea187e6997 github.com/smartcontractkit/chainlink-testing-framework/seth v1.51.5 github.com/smartcontractkit/chainlink/deployment v0.0.0-20260422181348-efa818697ce5 - github.com/smartcontractkit/chainlink/v2 v2.36.1-rc.0 - github.com/smartcontractkit/cre-sdk-go v1.4.1-0.20260330204130-964a5b106d0c + github.com/smartcontractkit/chainlink/v2 v2.29.1-cre-beta.0.0.20260422181348-efa818697ce5 + github.com/smartcontractkit/cre-sdk-go v1.5.0 github.com/smartcontractkit/cre-sdk-go/capabilities/blockchain/evm v1.0.0-beta.6.0.20260330204130-964a5b106d0c github.com/smartcontractkit/mcms v0.41.1 github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20251120172354-e8ec0386b06c @@ -317,9 +317,9 @@ require ( github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260415165642-49f23e4d76cc // indirect github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260415165642-49f23e4d76cc // indirect github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10 // indirect - github.com/smartcontractkit/chainlink-data-streams v0.1.14-0.20260504075031-e5aae8c82e91 // indirect + github.com/smartcontractkit/chainlink-data-streams v0.1.13 // indirect github.com/smartcontractkit/chainlink-deployments-framework v0.96.0 // indirect - github.com/smartcontractkit/chainlink-evm v0.3.4-0.20260504070828-3216bb63d886 // indirect + github.com/smartcontractkit/chainlink-evm v0.3.4-0.20260416173445-80f6efde0a03 // indirect github.com/smartcontractkit/chainlink-evm/contracts/cre/gobindings v0.0.0-20260403151002-2c91155b5501 // indirect github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-20260423135514-5b1a7565a99c // indirect github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20260423135514-5b1a7565a99c // indirect diff --git a/go.sum b/go.sum index bfbf7161..990cbf7b 100644 --- a/go.sum +++ b/go.sum @@ -1223,7 +1223,6 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg= github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is= -github.com/prometheus/prometheus v0.304.2 h1:HhjbaAwet87x8Be19PFI/5W96UMubGy3zt24kayEuh4= github.com/prometheus/prometheus v0.311.2-0.20260410083055-07c6232d159b h1:tjxqNQlYTJzrQrY7HM2SbnxqzuE64vnvlSmSbAvBBDE= github.com/prometheus/prometheus v0.311.2-0.20260410083055-07c6232d159b/go.mod h1:h4Ogksuo6VUZmnm6q/ruKTUzrg9Vvu6u/6O/rQ5xPMg= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= @@ -1308,8 +1307,6 @@ github.com/smartcontractkit/ccip-owner-contracts v0.1.0 h1:GiBDtlx7539o7AKlDV+9L github.com/smartcontractkit/ccip-owner-contracts v0.1.0/go.mod h1:NnT6w4Kj42OFFXhSx99LvJZWPpMjmo4+CpDEWfw61xY= github.com/smartcontractkit/chain-selectors v1.0.98 h1:fuI7CQ1o5cX64eO4/LvwtfhdpGFH5vnsM/bFHRwEiww= github.com/smartcontractkit/chain-selectors v1.0.98/go.mod h1:qy7whtgG5g+7z0jt0nRyii9bLND9m15NZTzuQPkMZ5w= -github.com/smartcontractkit/chainlink-aptos v0.0.0-20260430175646-295a7f9a1500 h1:045jrHCLI+MpeAyByJkyHbEjq0+aTPt04C7+sbsNNtw= -github.com/smartcontractkit/chainlink-aptos v0.0.0-20260430175646-295a7f9a1500/go.mod h1:zfE2R7887kiwXkGTHKPe5NBgwhFwIC3pnA2uAxrbvig= github.com/smartcontractkit/chainlink-aptos v0.0.0-20260511220427-1408ad3b1e69 h1:y/P8GwsRzSnIOvI09RFjMcgI1kZtaBU3NoNbdkIUkao= github.com/smartcontractkit/chainlink-aptos v0.0.0-20260511220427-1408ad3b1e69/go.mod h1:FEm5fvIQe5O8Qdx6GvQcXsk7rDFpmYdIWXea5i4tpjw= github.com/smartcontractkit/chainlink-automation v0.8.1 h1:sTc9LKpBvcKPc1JDYAmgBc2xpDKBco/Q4h4ydl6+UUU= @@ -1317,8 +1314,7 @@ github.com/smartcontractkit/chainlink-automation v0.8.1/go.mod h1:Iij36PvWZ6blrd github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20260428205619-2db1389501a1 h1:p0nFrTYrOQzDhWYm6suaM5CoWiXV5NV7llHnp6/Kn/8= github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20260428205619-2db1389501a1/go.mod h1:1XxxpkgCmG/z6y30yRuVrcxre6zixIVX3xzi706Db/8= github.com/smartcontractkit/chainlink-ccip/ccv/chains/evm v0.0.0-20260406180811-0ec22f0243a4 h1:b6IxxglkWivZ5nfYdYkHF4w0l2BJyEmSdyMYRm47aB4= -github.com/smartcontractkit/chainlink-ccip/ccv/chains/evm v0.0.0-20260408145530-22e2d05695cd h1:Jtw6p5iisjXZyFOcBvWh6PDQKtvryrRU2JMmezdutjo= -github.com/smartcontractkit/chainlink-ccip/ccv/chains/evm v0.0.0-20260408145530-22e2d05695cd/go.mod h1:zLqdD2kBX7NsntBneclb2yrHhjFaJdoyA8dK5eimlrE= +github.com/smartcontractkit/chainlink-ccip/ccv/chains/evm v0.0.0-20260406180811-0ec22f0243a4/go.mod h1:zLqdD2kBX7NsntBneclb2yrHhjFaJdoyA8dK5eimlrE= github.com/smartcontractkit/chainlink-ccip/chains/evm v0.0.0-20260428205619-2db1389501a1 h1:wfiut4oWMcpJmTEl/1ShwMBxwTQEv0wV4/YTma9Otxk= github.com/smartcontractkit/chainlink-ccip/chains/evm v0.0.0-20260428205619-2db1389501a1/go.mod h1:hrNuLHgDa2f47WVO6+KgSxM1/SI1M8npQnaiv4kw3xo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260415165642-49f23e4d76cc h1:mvobZx5JV5PhG/9IXPReV+8mAGnupl0HIWQZ43zxzd4= @@ -1326,8 +1322,7 @@ github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260415165642-4 github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260415165642-49f23e4d76cc h1:War93neyFmv7pzuElZeZC3qc/OfGtLvEXvqL3qeBfM0= github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260415165642-49f23e4d76cc/go.mod h1:67YbnoglYD61Pz/jTVCgav9wFq7S35OU8UyQSvPllRw= github.com/smartcontractkit/chainlink-ccv v0.0.0-20260408181529-b5080e662563 h1:1sYQ2lG3zbAG2vASNF5kLke8DhGk5lNaJirwPDx3Vi4= -github.com/smartcontractkit/chainlink-ccv v0.0.2-0.20260428133800-3b1484e8b1fd h1:IMopuENFVS63AerRELdfWo6o60UNUidcldJOxJLmk24= -github.com/smartcontractkit/chainlink-ccv v0.0.2-0.20260428133800-3b1484e8b1fd/go.mod h1:SBN8Urnh5sQvrQRbSo1Nr8coWatHg8LZoPw3R/42sho= +github.com/smartcontractkit/chainlink-ccv v0.0.0-20260408181529-b5080e662563/go.mod h1:nEuyjUh4wrK6mNXEAaOncl/AhCl31oaxOS160gNW0vc= github.com/smartcontractkit/chainlink-common v0.11.2-0.20260505124104-72181f5345ce h1:eoeTZYsKKgU8DaNm92p56bC8PQ1fjZCRyWzBko/hZdY= github.com/smartcontractkit/chainlink-common v0.11.2-0.20260505124104-72181f5345ce/go.mod h1:G2AII0QmWzXx8Ag9IKnGN3h/gwwNnhHUOCviJievdvo= github.com/smartcontractkit/chainlink-common/keystore v1.1.0 h1:2wzySccgk2fpWusPKO0bpeAZzfSU9eq6CS5U+JwYaVo= @@ -1336,12 +1331,12 @@ github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10 h1:FJAFgXS9 github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10/go.mod h1:oiDa54M0FwxevWwyAX773lwdWvFYYlYHHQV1LQ5HpWY= github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20251215152504-b1e41f508340 h1:PsjEI+5jZIz9AS4eOsLS5VpSWJINf38clXV3wryPyMk= github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20251215152504-b1e41f508340/go.mod h1:P/0OSXUlFaxxD4B/P6HWbxYtIRmmWGDJAvanq19879c= -github.com/smartcontractkit/chainlink-data-streams v0.1.14-0.20260504075031-e5aae8c82e91 h1:s8E4EYRKEjghJFDnIWQxw8zoCvORVolIY/EKZ+JmzRc= -github.com/smartcontractkit/chainlink-data-streams v0.1.14-0.20260504075031-e5aae8c82e91/go.mod h1:Fl6b/I5qn5TcEh85FP1rNsJ7stcYtmXhVbM2W5RuzQg= +github.com/smartcontractkit/chainlink-data-streams v0.1.13 h1:YOmt545DW6U0SyaqBf+NTGDLm1yMurVI7yOvxP5hlJk= +github.com/smartcontractkit/chainlink-data-streams v0.1.13/go.mod h1:00aL7OK0BJdF9gn/4t4f/pctUu2VLwwfA8G/tl9rCrM= github.com/smartcontractkit/chainlink-deployments-framework v0.96.0 h1:dwdKdXGDfzIwg1/PxQ3YxaeaFplyOtL+EPGtFPVGRmM= github.com/smartcontractkit/chainlink-deployments-framework v0.96.0/go.mod h1:vjdYbQDNUd3IznXuxv5Gm7VZB804TKOqjNo1BhFOUDk= -github.com/smartcontractkit/chainlink-evm v0.3.4-0.20260504070828-3216bb63d886 h1:ighx6Wf5Le/tp2nFIipnr3axk+zlmu6SZ6n7qp2mpqQ= -github.com/smartcontractkit/chainlink-evm v0.3.4-0.20260504070828-3216bb63d886/go.mod h1:GH17WWRgGTWHp4GfJbK/9LdgkajYuLx1TmAO/jqRKDs= +github.com/smartcontractkit/chainlink-evm v0.3.4-0.20260416173445-80f6efde0a03 h1:z+Au1CpZhVYpn7mkmG/mYFBFkdZoqibQ3LngEHm8Fqs= +github.com/smartcontractkit/chainlink-evm v0.3.4-0.20260416173445-80f6efde0a03/go.mod h1:6vCMfxz7cMW0wWseNKtct+b1JJbbRVJJhh/t6pQWN3M= github.com/smartcontractkit/chainlink-evm/contracts/cre/gobindings v0.0.0-20260403151002-2c91155b5501 h1:QJiXTG9CmaQAuMRn5JGi+Jhji7fSkehVnKpjc8oNJJY= github.com/smartcontractkit/chainlink-evm/contracts/cre/gobindings v0.0.0-20260403151002-2c91155b5501/go.mod h1:4cT1BeNF8DAn6In9zr3LayVCv1KzFeuxT7zcuNkfIb0= github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20260119171452-39c98c3b33cd h1:sK+pK4epQp20yQ7XztwrVgkTkRAr4FY+TvEegW8RuQk= @@ -1352,8 +1347,6 @@ github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-202604231355 github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-20260423135514-5b1a7565a99c/go.mod h1:HcwehCao5k5C2NGuKJUVoX/AYtoH6njGFiV44dBOcY4= github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20260423135514-5b1a7565a99c h1:0c+bCKo47vy/ItRtGa3S/vCpE5LRlgXpGnVKQX8TgjE= github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20260423135514-5b1a7565a99c/go.mod h1:kGprqyjsz6qFNVszOQoHc24wfvCjyipNZFste/3zcbs= -github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20260423135514-5b1a7565a99c h1:1VVreRcffo3N3zF1JVtgS+YC4puuj3y0FU0Fta7L3U0= -github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20260423135514-5b1a7565a99c/go.mod h1:HG/aei0MgBOpsyRLexdKGtOUO8yjSJO3iUu0Uu8KBm4= github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20260505202410-b350dca113b4 h1:v/rAtObo9zMpQDnGQ0seaSEqw60JUjowwcNw3DCpVY4= github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20260505202410-b350dca113b4/go.mod h1:HG/aei0MgBOpsyRLexdKGtOUO8yjSJO3iUu0Uu8KBm4= github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20260423135514-5b1a7565a99c h1:N5cZI93lPH0oYnVSP9dq72QwKnrW0gBpEmx2MI1ermg= @@ -1406,12 +1399,8 @@ github.com/smartcontractkit/chainlink-tron/relayer/gotron-sdk v0.0.5-0.202510141 github.com/smartcontractkit/chainlink-tron/relayer/gotron-sdk v0.0.5-0.20251014143056-a0c6328c91e9/go.mod h1:ea1LESxlSSOgc2zZBqf1RTkXTMthHaspdqUHd7W4lF0= github.com/smartcontractkit/chainlink/deployment v0.0.0-20260422181348-efa818697ce5 h1:5Vh1ulQMReXwg8qgT5by12MqJt+Dc9y3Y/df02QeLuk= github.com/smartcontractkit/chainlink/deployment v0.0.0-20260422181348-efa818697ce5/go.mod h1:pMBypeRoT8Nnb5gbkW6kIs+fBVsc/OzUx2eR9MtyFaw= -github.com/smartcontractkit/chainlink/v2 v2.36.1-rc.0 h1:H6/GFRqI3/pFuc5Nb+GhWPg/Xt8ajfsMkrySm2YoKwE= -github.com/smartcontractkit/chainlink/v2 v2.36.1-rc.0/go.mod h1:x2P+mXAZI6flpxgwrhdLD95IHjSww7YgfRUYsAWUxos= -github.com/smartcontractkit/chainlink/v2 v2.46.0 h1:CeILLkUl64Mh39WHe5SmPDw8Fldu8BYI4rJWjveYnuw= -github.com/smartcontractkit/chainlink/v2 v2.46.0/go.mod h1:gNJE4C5BxtRggz+EY1B1DbURmRtB9pjHR/q5MttjFlc= -github.com/smartcontractkit/cre-sdk-go v1.4.1-0.20260330204130-964a5b106d0c h1:iwz7ViEyN/4DP/NjcA6L3z0yRa1Isy3mB0+aU4/5460= -github.com/smartcontractkit/cre-sdk-go v1.4.1-0.20260330204130-964a5b106d0c/go.mod h1:yYrQFz1UH7hhRbPO0q4fgo1tfsJNd4yXnI3oCZE0RzM= +github.com/smartcontractkit/chainlink/v2 v2.29.1-cre-beta.0.0.20260422181348-efa818697ce5 h1:G2TvBxwvzLMIU5hMPsQlVAY027mT1P/VTiWA6yegmpM= +github.com/smartcontractkit/chainlink/v2 v2.29.1-cre-beta.0.0.20260422181348-efa818697ce5/go.mod h1:8/a/Nlo4ZndgBEumXoE+gvBA5LH40BfDM+6SZa4Q89M= github.com/smartcontractkit/cre-sdk-go v1.5.0 h1:kepW3QDKARrOOHjXwWAZ9j5KLk6bxLzvi6OMrLsFwVo= github.com/smartcontractkit/cre-sdk-go v1.5.0/go.mod h1:yYrQFz1UH7hhRbPO0q4fgo1tfsJNd4yXnI3oCZE0RzM= github.com/smartcontractkit/cre-sdk-go/capabilities/blockchain/evm v1.0.0-beta.6.0.20260330204130-964a5b106d0c h1:UUhjBBOiJLp6ZiEqRprPBdvAX2IZApwKYEYgthAv0fA= From e76147660c26aa755ef67a552fe2f9f73c5a98ed Mon Sep 17 00:00:00 2001 From: yashnevatia Date: Tue, 12 May 2026 13:39:26 +0100 Subject: [PATCH 6/9] push tagged version --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 6705ddca..90339366 100644 --- a/go.mod +++ b/go.mod @@ -32,8 +32,8 @@ require ( github.com/smartcontractkit/chainlink-testing-framework/seth v1.51.5 github.com/smartcontractkit/chainlink/deployment v0.0.0-20260422181348-efa818697ce5 github.com/smartcontractkit/chainlink/v2 v2.29.1-cre-beta.0.0.20260422181348-efa818697ce5 - github.com/smartcontractkit/cre-sdk-go v1.5.0 - github.com/smartcontractkit/cre-sdk-go/capabilities/blockchain/evm v1.0.0-beta.6.0.20260330204130-964a5b106d0c + github.com/smartcontractkit/cre-sdk-go v1.9.0-capdev.1 + github.com/smartcontractkit/cre-sdk-go/capabilities/blockchain/evm v1.0.0-beta.10-capdev.1 github.com/smartcontractkit/mcms v0.41.1 github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20251120172354-e8ec0386b06c github.com/spf13/cobra v1.10.2 diff --git a/go.sum b/go.sum index 990cbf7b..d75dcb76 100644 --- a/go.sum +++ b/go.sum @@ -1401,10 +1401,10 @@ github.com/smartcontractkit/chainlink/deployment v0.0.0-20260422181348-efa818697 github.com/smartcontractkit/chainlink/deployment v0.0.0-20260422181348-efa818697ce5/go.mod h1:pMBypeRoT8Nnb5gbkW6kIs+fBVsc/OzUx2eR9MtyFaw= github.com/smartcontractkit/chainlink/v2 v2.29.1-cre-beta.0.0.20260422181348-efa818697ce5 h1:G2TvBxwvzLMIU5hMPsQlVAY027mT1P/VTiWA6yegmpM= github.com/smartcontractkit/chainlink/v2 v2.29.1-cre-beta.0.0.20260422181348-efa818697ce5/go.mod h1:8/a/Nlo4ZndgBEumXoE+gvBA5LH40BfDM+6SZa4Q89M= -github.com/smartcontractkit/cre-sdk-go v1.5.0 h1:kepW3QDKARrOOHjXwWAZ9j5KLk6bxLzvi6OMrLsFwVo= -github.com/smartcontractkit/cre-sdk-go v1.5.0/go.mod h1:yYrQFz1UH7hhRbPO0q4fgo1tfsJNd4yXnI3oCZE0RzM= -github.com/smartcontractkit/cre-sdk-go/capabilities/blockchain/evm v1.0.0-beta.6.0.20260330204130-964a5b106d0c h1:UUhjBBOiJLp6ZiEqRprPBdvAX2IZApwKYEYgthAv0fA= -github.com/smartcontractkit/cre-sdk-go/capabilities/blockchain/evm v1.0.0-beta.6.0.20260330204130-964a5b106d0c/go.mod h1:DAC99+IO2/7v1osIUqo7ggpJb2dSGP2PCKcJ/CNdDtg= +github.com/smartcontractkit/cre-sdk-go v1.9.0-capdev.1 h1:SC8Uy7KGvNrQXgDXxxHe1oTl6k0eMtAqup3QRf9oNZk= +github.com/smartcontractkit/cre-sdk-go v1.9.0-capdev.1/go.mod h1:6hAl5/hIfy4xUeevNvNf4vywdQ1pClGj4nbdMge4VRM= +github.com/smartcontractkit/cre-sdk-go/capabilities/blockchain/evm v1.0.0-beta.10-capdev.1 h1:b9IJ0XNks6I50myeQMyp86iAiW6FRjogiEUzT4SZwHw= +github.com/smartcontractkit/cre-sdk-go/capabilities/blockchain/evm v1.0.0-beta.10-capdev.1/go.mod h1:DAC99+IO2/7v1osIUqo7ggpJb2dSGP2PCKcJ/CNdDtg= github.com/smartcontractkit/freeport v0.1.3-0.20250828155247-add56fa28aad h1:lgHxTHuzJIF3Vj6LSMOnjhqKgRqYW+0MV2SExtCYL1Q= github.com/smartcontractkit/freeport v0.1.3-0.20250828155247-add56fa28aad/go.mod h1:T4zH9R8R8lVWKfU7tUvYz2o2jMv1OpGCdpY2j2QZXzU= github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 h1:12ijqMM9tvYVEm+nR826WsrNi6zCKpwBhuApq127wHs= From 7680067ff65a6bcdcaa980970fcca32f755212a1 Mon Sep 17 00:00:00 2001 From: yashnevatia Date: Tue, 12 May 2026 13:50:10 +0100 Subject: [PATCH 7/9] Tidy --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 90339366..eb929b91 100644 --- a/go.mod +++ b/go.mod @@ -321,10 +321,10 @@ require ( github.com/smartcontractkit/chainlink-deployments-framework v0.96.0 // indirect github.com/smartcontractkit/chainlink-evm v0.3.4-0.20260416173445-80f6efde0a03 // indirect github.com/smartcontractkit/chainlink-evm/contracts/cre/gobindings v0.0.0-20260403151002-2c91155b5501 // indirect - github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-20260423135514-5b1a7565a99c // indirect - github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20260423135514-5b1a7565a99c // indirect + github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-20250818175541-3389ac08a563 // indirect + github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20260326122810-b657beadfb57 // indirect github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20260505202410-b350dca113b4 // indirect - github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20260423135514-5b1a7565a99c // indirect + github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20260410144512-ca02ad6ed16a // indirect github.com/smartcontractkit/chainlink-protos/billing/go v0.0.0-20251024234028-0988426d98f4 // indirect github.com/smartcontractkit/chainlink-protos/job-distributor v0.18.0 // indirect github.com/smartcontractkit/chainlink-protos/linking-service/go v0.0.0-20251002192024-d2ad9222409b // indirect diff --git a/go.sum b/go.sum index d75dcb76..634a6554 100644 --- a/go.sum +++ b/go.sum @@ -1343,14 +1343,14 @@ github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20260119171452-39c github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20260119171452-39c98c3b33cd/go.mod h1:7Jlt72+V9891y3LnGwHzmQwt9tfEGYryRKiGlQHo/o8= 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-20260423135514-5b1a7565a99c h1:AYRSQarVw1EJXUrGvHSwmRTtNHHww/i3xwLat5CshUE= -github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-20260423135514-5b1a7565a99c/go.mod h1:HcwehCao5k5C2NGuKJUVoX/AYtoH6njGFiV44dBOcY4= -github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20260423135514-5b1a7565a99c h1:0c+bCKo47vy/ItRtGa3S/vCpE5LRlgXpGnVKQX8TgjE= -github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20260423135514-5b1a7565a99c/go.mod h1:kGprqyjsz6qFNVszOQoHc24wfvCjyipNZFste/3zcbs= +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-20260326122810-b657beadfb57 h1:sCrr1Oy/JZstf/Oi2cRuU4mDN1BRUKfXP2CKByCMADg= +github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20260326122810-b657beadfb57/go.mod h1:kGprqyjsz6qFNVszOQoHc24wfvCjyipNZFste/3zcbs= github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20260505202410-b350dca113b4 h1:v/rAtObo9zMpQDnGQ0seaSEqw60JUjowwcNw3DCpVY4= github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20260505202410-b350dca113b4/go.mod h1:HG/aei0MgBOpsyRLexdKGtOUO8yjSJO3iUu0Uu8KBm4= -github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20260423135514-5b1a7565a99c h1:N5cZI93lPH0oYnVSP9dq72QwKnrW0gBpEmx2MI1ermg= -github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20260423135514-5b1a7565a99c/go.mod h1:7ketk4ischPQW/JQgmyHz6zdzLUJv1VC29SiSgosydQ= +github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20260410144512-ca02ad6ed16a h1:PsFckZp3Dhb5pVc0Xccj1lvnOEg0H3eQdjtZgnCKd+4= +github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20260410144512-ca02ad6ed16a/go.mod h1:7ketk4ischPQW/JQgmyHz6zdzLUJv1VC29SiSgosydQ= 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= From 978e897adaf1c72676d5231caec5965aba9f0b18 Mon Sep 17 00:00:00 2001 From: Michael Fletcher Date: Tue, 12 May 2026 14:52:17 +0100 Subject: [PATCH 8/9] fix(simulate/aptos): adapt to chainlink-aptos AptosRpcClient API Upstream chainlink-aptos PR 442 dropped the aptosfakes.AptosClient named-interface re-export and the NewAptosClient wrapper as part of parity-audit cleanup, since both were thin shims around aptos-go-sdk's own aptos.AptosRpcClient and aptos.NewClient. After bef9e78 + c544e62 bumped the dep to the merged SHA and patched the import path, the type references still pointed at the removed symbols and CI on PRs targeting main broke at compile. Switch the simulate Aptos chain to construct the RPC client via aptos.NewClient(NetworkConfig{NodeUrl}) directly and assert against aptos.AptosRpcClient. FakeAptosChain still owns the fake capability surface; only the wrapper indirection is removed. --- cmd/workflow/simulate/chain/aptos/capabilities.go | 2 +- cmd/workflow/simulate/chain/aptos/chaintype.go | 12 ++++++------ cmd/workflow/simulate/chain/aptos/chaintype_test.go | 2 +- cmd/workflow/simulate/chain/aptos/health.go | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cmd/workflow/simulate/chain/aptos/capabilities.go b/cmd/workflow/simulate/chain/aptos/capabilities.go index 806e7a1d..e7934e26 100644 --- a/cmd/workflow/simulate/chain/aptos/capabilities.go +++ b/cmd/workflow/simulate/chain/aptos/capabilities.go @@ -28,7 +28,7 @@ func NewAptosChainCapabilities( ctx context.Context, lggr logger.Logger, registry *capabilities.Registry, - clients map[uint64]aptosfakes.AptosClient, + clients map[uint64]aptos.AptosRpcClient, forwarders map[uint64]string, privateKey *crypto.Ed25519PrivateKey, dryRunChainWrite bool, diff --git a/cmd/workflow/simulate/chain/aptos/chaintype.go b/cmd/workflow/simulate/chain/aptos/chaintype.go index 71b2311c..756b94ca 100644 --- a/cmd/workflow/simulate/chain/aptos/chaintype.go +++ b/cmd/workflow/simulate/chain/aptos/chaintype.go @@ -6,11 +6,11 @@ import ( "fmt" "strings" + "github.com/aptos-labs/aptos-go-sdk" "github.com/aptos-labs/aptos-go-sdk/crypto" "github.com/rs/zerolog" "github.com/spf13/viper" - aptosfakes "github.com/smartcontractkit/chainlink-aptos/capabilities/fakes" corekeys "github.com/smartcontractkit/chainlink-common/keystore/corekeys" "github.com/smartcontractkit/chainlink-common/pkg/services" @@ -54,7 +54,7 @@ func (ct *AptosChainType) ResolveClients(v *viper.Viper) (chain.ResolvedChains, continue } ct.log.Debug().Msgf("Using RPC for %s: %s", name, chain.RedactURL(rpcURL)) - client, err := aptosfakes.NewAptosClient(rpcURL) + client, err := aptos.NewClient(aptos.NetworkConfig{NodeUrl: rpcURL}) if err != nil { ui.Warning(fmt.Sprintf("Failed to build Aptos client for %s: %v", name, err)) continue @@ -94,7 +94,7 @@ func (ct *AptosChainType) ResolveClients(v *viper.Viper) (chain.ResolvedChains, continue } ct.log.Debug().Msgf("Using RPC for experimental aptos chain %d: %s", ec.ChainSelector, chain.RedactURL(ec.RPCURL)) - client, err := aptosfakes.NewAptosClient(ec.RPCURL) + client, err := aptos.NewClient(aptos.NetworkConfig{NodeUrl: ec.RPCURL}) if err != nil { return chain.ResolvedChains{}, fmt.Errorf("failed to create aptos client for experimental chain %d: %w", ec.ChainSelector, err) } @@ -136,11 +136,11 @@ func (ct *AptosChainType) ResolveTriggerData(_ context.Context, _ uint64, _ chai } func (ct *AptosChainType) RegisterCapabilities(ctx context.Context, cfg chain.CapabilityConfig) ([]services.Service, error) { - typedClients := make(map[uint64]aptosfakes.AptosClient, len(cfg.Clients)) + typedClients := make(map[uint64]aptos.AptosRpcClient, len(cfg.Clients)) for sel, c := range cfg.Clients { - ac, ok := c.(aptosfakes.AptosClient) + ac, ok := c.(aptos.AptosRpcClient) if !ok { - return nil, fmt.Errorf("aptos: client for selector %d is not aptosfakes.AptosClient", sel) + return nil, fmt.Errorf("aptos: client for selector %d is not aptos.AptosRpcClient", sel) } typedClients[sel] = ac } diff --git a/cmd/workflow/simulate/chain/aptos/chaintype_test.go b/cmd/workflow/simulate/chain/aptos/chaintype_test.go index a2d5bc72..498c0c4c 100644 --- a/cmd/workflow/simulate/chain/aptos/chaintype_test.go +++ b/cmd/workflow/simulate/chain/aptos/chaintype_test.go @@ -97,7 +97,7 @@ func TestRegisterCapabilities_WrongClientType(t *testing.T) { } _, err := ct.RegisterCapabilities(context.Background(), cfg) require.Error(t, err) - assert.Contains(t, err.Error(), "client for selector 1 is not aptosfakes.AptosClient") + assert.Contains(t, err.Error(), "client for selector 1 is not aptos.AptosRpcClient") } func TestRegisterCapabilities_WrongPrivateKeyType(t *testing.T) { diff --git a/cmd/workflow/simulate/chain/aptos/health.go b/cmd/workflow/simulate/chain/aptos/health.go index 028176a1..5f7e470d 100644 --- a/cmd/workflow/simulate/chain/aptos/health.go +++ b/cmd/workflow/simulate/chain/aptos/health.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - aptosfakes "github.com/smartcontractkit/chainlink-aptos/capabilities/fakes" + "github.com/aptos-labs/aptos-go-sdk" "github.com/smartcontractkit/cre-cli/cmd/workflow/simulate/chain" "github.com/smartcontractkit/cre-cli/internal/settings" @@ -22,7 +22,7 @@ func RunRPCHealthCheck(clients map[uint64]chain.ChainClient, experimentalSelecto errs = append(errs, fmt.Errorf("[%d] nil client", sel)) continue } - ac, ok := c.(aptosfakes.AptosClient) + ac, ok := c.(aptos.AptosRpcClient) if !ok { errs = append(errs, fmt.Errorf("[%d] invalid client type for Aptos chain type", sel)) continue From b543ff85532a0f3a466b14e304ff1de6994db9b8 Mon Sep 17 00:00:00 2001 From: yashnevatia Date: Tue, 12 May 2026 15:57:32 +0100 Subject: [PATCH 9/9] support tagged versions --- .github/workflows/validate-sdk-version.yml | 32 ++++++++++++++++++++-- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/.github/workflows/validate-sdk-version.yml b/.github/workflows/validate-sdk-version.yml index d1aa8b95..c0be82f9 100644 --- a/.github/workflows/validate-sdk-version.yml +++ b/.github/workflows/validate-sdk-version.yml @@ -40,10 +40,36 @@ jobs: found=1 - # Go pseudo-versions end with a commit hash after the last "-". + # Pseudo-versions have 3 parts separated by "-" and end with a 12-char hex commit hash. # e.g. "v0.0.0-20260420204255-a3f3bdd56877" -> "a3f3bdd56877" - commit=${version##*-} - echo " parsed commit: $commit" + # Tagged versions like "v1.9.0-capdev.1" don't match this pattern. + suffix=${version##*-} + if [[ "$suffix" =~ ^[0-9a-f]{12}$ ]]; then + # Pseudo-version: use the commit hash directly. + commit="$suffix" + echo " parsed commit (pseudo-version): $commit" + else + # Tagged version: resolve the tag to a commit. + # The module path prefix (github.com/smartcontractkit/cre-sdk-go) maps to the + # repo root; any sub-module suffix becomes a tag prefix. + # e.g. module "github.com/smartcontractkit/cre-sdk-go/capabilities/blockchain/evm" + # with version "v1.0.0-beta.10-capdev.1" -> tag "capabilities/blockchain/evm/v1.0.0-beta.10-capdev.1" + subpath=${mod#github.com/smartcontractkit/cre-sdk-go} + subpath=${subpath#/} + if [[ -n "$subpath" ]]; then + tag="${subpath}/${version}" + else + tag="${version}" + fi + echo " resolved tag: $tag" + commit=$(git -C .cre-sdk-go rev-list -n1 "$tag" 2>/dev/null || true) + if [[ -z "$commit" ]]; then + echo "::error::$mod tag $tag not found in cre-sdk-go" + failed=1 + continue + fi + echo " resolved commit: $commit" + fi echo "Checking module=$mod version=$version commit=$commit"