From 4d89dcc4abc8ecadca7e5962de0cf9b3fbab585f Mon Sep 17 00:00:00 2001 From: Jordan Krage Date: Mon, 14 Sep 2026 07:00:46 -0600 Subject: [PATCH 1/4] remove cosmos LOOPP --- plugins/plugins.public.yaml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/plugins/plugins.public.yaml b/plugins/plugins.public.yaml index 365ca0c203a..6ac6c36b47c 100644 --- a/plugins/plugins.public.yaml +++ b/plugins/plugins.public.yaml @@ -21,14 +21,6 @@ plugins: gitRef: "v0.0.0-20260827120130-362c4a408695" installPath: "./relayer/cmd/chainlink-sui" - cosmos: - - moduleURI: "github.com/smartcontractkit/chainlink-cosmos" - gitRef: "v0.5.2-0.20260219133256-b46d473fd6f5" - installPath: "./pkg/cosmos/cmd/chainlink-cosmos" - # These will be copied into /usr/lib in the container. - libs: - - /go/pkg/mod/github.com/!cosm!wasm/wasmvm@v*/internal/api/libwasmvm.*.so - feeds: - moduleURI: "github.com/smartcontractkit/chainlink-feeds" gitRef: "v0.1.2-0.20250227211209-7cd000095135" From a16964f4d0da80c3c5ee59ff59065990a5ca69b6 Mon Sep 17 00:00:00 2001 From: Jordan Krage Date: Mon, 14 Sep 2026 07:35:18 -0600 Subject: [PATCH 2/4] skip cosmos tests --- core/cmd/chains_commands_integration_test.go | 1 + core/cmd/cosmos_keys_commands_test.go | 2 ++ core/cmd/node_commands_integration_test.go | 1 + 3 files changed, 4 insertions(+) diff --git a/core/cmd/chains_commands_integration_test.go b/core/cmd/chains_commands_integration_test.go index c173b28e9b6..d9056c26991 100644 --- a/core/cmd/chains_commands_integration_test.go +++ b/core/cmd/chains_commands_integration_test.go @@ -16,6 +16,7 @@ import ( ) func TestShell_IndexCosmosChains(t *testing.T) { + t.Skip("cosmos is not installed") t.Parallel() chainID := cosmostest.RandomChainID() diff --git a/core/cmd/cosmos_keys_commands_test.go b/core/cmd/cosmos_keys_commands_test.go index c98825b5f9c..6a67976a4ce 100644 --- a/core/cmd/cosmos_keys_commands_test.go +++ b/core/cmd/cosmos_keys_commands_test.go @@ -19,6 +19,7 @@ import ( ) func TestCosmosKeyPresenter_RenderTable(t *testing.T) { + t.Skip("cosmos is not installed") t.Parallel() var ( @@ -54,6 +55,7 @@ func TestCosmosKeyPresenter_RenderTable(t *testing.T) { } func TestShell_CosmosKeys(t *testing.T) { + t.Skip("cosmos is not installed") app := startNewApplicationV2(t, nil) ks := app.GetKeyStore().Cosmos() cleanup := func() { diff --git a/core/cmd/node_commands_integration_test.go b/core/cmd/node_commands_integration_test.go index 2ccaefb30f8..6b019b751c7 100644 --- a/core/cmd/node_commands_integration_test.go +++ b/core/cmd/node_commands_integration_test.go @@ -34,6 +34,7 @@ func solanaStartNewApplication(t *testing.T, cfgs ...chainlink.RawConfig) *cltes } func TestShell_IndexCosmosNodes(t *testing.T) { + t.Skip("cosmos is not installed") t.Parallel() chainID := cosmostest.RandomChainID() From 0910503c2b828bb695d675440763a5cffe182fc3 Mon Sep 17 00:00:00 2001 From: Jordan Krage Date: Mon, 14 Sep 2026 07:56:12 -0600 Subject: [PATCH 3/4] remove cosmos config --- core/cmd/chains_commands_integration_test.go | 2 +- core/cmd/cosmos_keys_commands_test.go | 4 +- core/cmd/node_commands_integration_test.go | 2 +- core/config/docs/chains-cosmos.toml | 33 ----- core/config/docs/docs.go | 4 +- core/services/chainlink/config_test.go | 9 +- .../chainlink/testdata/config-invalid.toml | 14 --- .../web/chains_controller_integration_test.go | 2 + core/web/cosmos_keys_controller_test.go | 4 + core/web/presenters/chain_msg_test.go | 1 + docs/CONFIG.md | 117 ------------------ .../admin/profile/multi-chain-loopp.txtar | 10 +- .../scripts/health/multi-chain-loopp.txtar | 77 ------------ .../node/validate/invalid-duplicates.txtar | 19 +-- testdata/scripts/nodes/cosmos/help.txtar | 16 --- testdata/scripts/nodes/cosmos/list/help.txtar | 9 -- testdata/scripts/nodes/cosmos/list/list.txtar | 56 --------- 17 files changed, 15 insertions(+), 364 deletions(-) delete mode 100644 core/config/docs/chains-cosmos.toml delete mode 100644 testdata/scripts/nodes/cosmos/help.txtar delete mode 100644 testdata/scripts/nodes/cosmos/list/help.txtar delete mode 100644 testdata/scripts/nodes/cosmos/list/list.txtar diff --git a/core/cmd/chains_commands_integration_test.go b/core/cmd/chains_commands_integration_test.go index d9056c26991..d3ebfbcea73 100644 --- a/core/cmd/chains_commands_integration_test.go +++ b/core/cmd/chains_commands_integration_test.go @@ -16,7 +16,7 @@ import ( ) func TestShell_IndexCosmosChains(t *testing.T) { - t.Skip("cosmos is not installed") + t.Skip("cosmos has been deprecated") t.Parallel() chainID := cosmostest.RandomChainID() diff --git a/core/cmd/cosmos_keys_commands_test.go b/core/cmd/cosmos_keys_commands_test.go index 6a67976a4ce..7ea84ca3799 100644 --- a/core/cmd/cosmos_keys_commands_test.go +++ b/core/cmd/cosmos_keys_commands_test.go @@ -19,7 +19,7 @@ import ( ) func TestCosmosKeyPresenter_RenderTable(t *testing.T) { - t.Skip("cosmos is not installed") + t.Skip("cosmos has been deprecated") t.Parallel() var ( @@ -55,7 +55,7 @@ func TestCosmosKeyPresenter_RenderTable(t *testing.T) { } func TestShell_CosmosKeys(t *testing.T) { - t.Skip("cosmos is not installed") + t.Skip("cosmos has been deprecated") app := startNewApplicationV2(t, nil) ks := app.GetKeyStore().Cosmos() cleanup := func() { diff --git a/core/cmd/node_commands_integration_test.go b/core/cmd/node_commands_integration_test.go index 6b019b751c7..1ebb928c60c 100644 --- a/core/cmd/node_commands_integration_test.go +++ b/core/cmd/node_commands_integration_test.go @@ -34,7 +34,7 @@ func solanaStartNewApplication(t *testing.T, cfgs ...chainlink.RawConfig) *cltes } func TestShell_IndexCosmosNodes(t *testing.T) { - t.Skip("cosmos is not installed") + t.Skip("cosmos has been deprecated") t.Parallel() chainID := cosmostest.RandomChainID() diff --git a/core/config/docs/chains-cosmos.toml b/core/config/docs/chains-cosmos.toml deleted file mode 100644 index a31d9c2e92b..00000000000 --- a/core/config/docs/chains-cosmos.toml +++ /dev/null @@ -1,33 +0,0 @@ -[[Cosmos]] -# ChainID is the Cosmos chain ID. Mandatory. -ChainID = 'Malaga-420' # Example -# Enabled enables this chain. -Enabled = true # Default -# Bech32Prefix is the human-readable prefix for addresses on this Cosmos chain. See https://docs.cosmos.network/v0.47/spec/addresses/bech32. -Bech32Prefix = 'wasm' # Default -# BlockRate is the average time between blocks. -BlockRate = '6s' # Default -# BlocksUntilTxTimeout is the number of blocks to wait before giving up on the tx getting confirmed. -BlocksUntilTxTimeout = 30 # Default -# ConfirmPollPeriod sets how often check for tx confirmation. -ConfirmPollPeriod = '1s' # Default -# FallbackGasPrice sets a fallback gas price to use when the estimator is not available. -FallbackGasPrice = '0.015' # Default -# GasToken is the token denomination which is being used to pay gas fees on this chain. -GasToken = 'ucosm' # Default -# GasLimitMultiplier scales the estimated gas limit. -GasLimitMultiplier = '1.5' # Default -# MaxMsgsPerBatch limits the numbers of messages per transaction batch. -MaxMsgsPerBatch = 100 # Default -# OCR2CachePollPeriod is the rate to poll for the OCR2 state cache. -OCR2CachePollPeriod = '4s' # Default -# OCR2CacheTTL is the stale OCR2 cache deadline. -OCR2CacheTTL = '1m' # Default -# TxMsgTimeout is the maximum age for resending transaction before they expire. -TxMsgTimeout = '10m' # Default - -[[Cosmos.Nodes]] -# Name is a unique (per-chain) identifier for this node. -Name = 'primary' # Example -# TendermintURL is the HTTP(S) tendermint endpoint for this node. -TendermintURL = 'http://tender.mint' # Example diff --git a/core/config/docs/docs.go b/core/config/docs/docs.go index 8e4ab853cbb..c04ae0ad2d1 100644 --- a/core/config/docs/docs.go +++ b/core/config/docs/docs.go @@ -14,8 +14,6 @@ var ( coreTOML string //go:embed chains-evm.toml chainsEVMTOML string - //go:embed chains-cosmos.toml - chainsCosmosTOML string //go:embed chains-solana.toml chainsSolanaTOML string //go:embed chains-starknet.toml @@ -26,7 +24,7 @@ var ( //go:embed example-secrets.toml exampleSecrets string - docsTOML = coreTOML + chainsEVMTOML + chainsCosmosTOML + chainsSolanaTOML + chainsStarknetTOML + docsTOML = coreTOML + chainsEVMTOML + chainsSolanaTOML + chainsStarknetTOML ) // GenerateConfig returns MarkDown documentation generated from core.toml & chains-*.toml. diff --git a/core/services/chainlink/config_test.go b/core/services/chainlink/config_test.go index cdbffff7e6c..11617a490fe 100644 --- a/core/services/chainlink/config_test.go +++ b/core/services/chainlink/config_test.go @@ -1419,7 +1419,7 @@ func TestConfig_Validate(t *testing.T) { toml string exp string }{ - {name: "invalid", toml: invalidTOML, exp: `invalid configuration: 10 errors: + {name: "invalid", toml: invalidTOML, exp: `invalid configuration: 9 errors: - P2P.V2.Enabled: invalid value (false): P2P required for OCR or OCR2. Please enable P2P or disable OCR/OCR2. - Database.Lock.LeaseRefreshInterval: invalid value (6s): must be less than or equal to half of LeaseDuration (10s) - WebServer: 8 errors: @@ -1488,13 +1488,6 @@ func TestConfig_Validate(t *testing.T) { - Nodes: missing: must have at least one node - 5.Transactions.AutoPurge.DetectionApiUrl: invalid value (): must be set for scroll - 6.Nodes: missing: 0th node (primary) must have a valid WSURL when http polling is disabled - - Cosmos: 4 errors: - - 1.ChainID: invalid value (Malaga-420): duplicate - must be unique - - 0.Nodes.1.Name: invalid value (test): duplicate - must be unique - - 1.Nodes: missing: expected at least one node - - 2: 2 errors: - - ChainID: missing: required for all chains - - Nodes: missing: expected at least one node - Solana: 4 errors: - 1.ChainID: invalid value (mainnet): duplicate - must be unique - 1.Nodes.1.Name: invalid value (bar): duplicate - must be unique diff --git a/core/services/chainlink/testdata/config-invalid.toml b/core/services/chainlink/testdata/config-invalid.toml index 845b0599e95..f7b082e8cd1 100644 --- a/core/services/chainlink/testdata/config-invalid.toml +++ b/core/services/chainlink/testdata/config-invalid.toml @@ -155,20 +155,6 @@ NewHeadsPollInterval = '1s' Name = 'passing-fake' HTTPURl = 'http://foo.bar2' -[[Cosmos]] -ChainID = 'Malaga-420' - -[[Cosmos.Nodes]] -Name = 'test' - -[[Cosmos.Nodes]] -Name = 'test' - -[[Cosmos]] -ChainID = 'Malaga-420' - -[[Cosmos]] - [[Solana]] ChainID = 'mainnet' diff --git a/core/web/chains_controller_integration_test.go b/core/web/chains_controller_integration_test.go index 69be9a9bdb1..4231fd0e959 100644 --- a/core/web/chains_controller_integration_test.go +++ b/core/web/chains_controller_integration_test.go @@ -24,6 +24,7 @@ import ( ) func Test_CosmosChainsController_Show(t *testing.T) { + t.Skip("cosmos has been deprecated") t.Parallel() const validID = "Chainlink-12" @@ -131,6 +132,7 @@ TendermintURL = 'http://tender.mint' } func Test_CosmosChainsController_Index(t *testing.T) { + t.Skip("cosmos has been deprecated") t.Parallel() chainA := chainlink.RawConfig{ diff --git a/core/web/cosmos_keys_controller_test.go b/core/web/cosmos_keys_controller_test.go index 14eaf286771..be005e6e30d 100644 --- a/core/web/cosmos_keys_controller_test.go +++ b/core/web/cosmos_keys_controller_test.go @@ -15,6 +15,7 @@ import ( ) func TestCosmosKeysController_Index_HappyPath(t *testing.T) { + t.Skip("cosmos has been deprecated") t.Parallel() client, keyStore := setupCosmosKeysControllerTests(t) @@ -35,6 +36,7 @@ func TestCosmosKeysController_Index_HappyPath(t *testing.T) { } func TestCosmosKeysController_Create_HappyPath(t *testing.T) { + t.Skip("cosmos has been deprecated") t.Parallel() app := cltest.NewApplicationEVMDisabled(t) @@ -62,6 +64,7 @@ func TestCosmosKeysController_Create_HappyPath(t *testing.T) { } func TestCosmosKeysController_Delete_NonExistentCosmosKeyID(t *testing.T) { + t.Skip("cosmos has been deprecated") t.Parallel() client, _ := setupCosmosKeysControllerTests(t) @@ -73,6 +76,7 @@ func TestCosmosKeysController_Delete_NonExistentCosmosKeyID(t *testing.T) { } func TestCosmosKeysController_Delete_HappyPath(t *testing.T) { + t.Skip("cosmos has been deprecated") t.Parallel() ctx := t.Context() diff --git a/core/web/presenters/chain_msg_test.go b/core/web/presenters/chain_msg_test.go index 4fa9eafc0b8..036d0bc71b3 100644 --- a/core/web/presenters/chain_msg_test.go +++ b/core/web/presenters/chain_msg_test.go @@ -41,6 +41,7 @@ func TestSolanaMessageResource(t *testing.T) { } func TestCosmosMessageResource(t *testing.T) { + t.Skip("cosmos has been deprecated") t.Parallel() id := "1" chainID := cosmostest.RandomChainID() diff --git a/docs/CONFIG.md b/docs/CONFIG.md index e234cbe626a..c2f42515325 100644 --- a/docs/CONFIG.md +++ b/docs/CONFIG.md @@ -17772,123 +17772,6 @@ AcceptanceTimeout = '30s' # Default ``` AcceptanceTimeout is the default timeout for a transmission to be accepted on chain -## Cosmos -```toml -[[Cosmos]] -ChainID = 'Malaga-420' # Example -Enabled = true # Default -Bech32Prefix = 'wasm' # Default -BlockRate = '6s' # Default -BlocksUntilTxTimeout = 30 # Default -ConfirmPollPeriod = '1s' # Default -FallbackGasPrice = '0.015' # Default -GasToken = 'ucosm' # Default -GasLimitMultiplier = '1.5' # Default -MaxMsgsPerBatch = 100 # Default -OCR2CachePollPeriod = '4s' # Default -OCR2CacheTTL = '1m' # Default -TxMsgTimeout = '10m' # Default -``` - - -### ChainID -```toml -ChainID = 'Malaga-420' # Example -``` -ChainID is the Cosmos chain ID. Mandatory. - -### Enabled -```toml -Enabled = true # Default -``` -Enabled enables this chain. - -### Bech32Prefix -```toml -Bech32Prefix = 'wasm' # Default -``` -Bech32Prefix is the human-readable prefix for addresses on this Cosmos chain. See https://docs.cosmos.network/v0.47/spec/addresses/bech32. - -### BlockRate -```toml -BlockRate = '6s' # Default -``` -BlockRate is the average time between blocks. - -### BlocksUntilTxTimeout -```toml -BlocksUntilTxTimeout = 30 # Default -``` -BlocksUntilTxTimeout is the number of blocks to wait before giving up on the tx getting confirmed. - -### ConfirmPollPeriod -```toml -ConfirmPollPeriod = '1s' # Default -``` -ConfirmPollPeriod sets how often check for tx confirmation. - -### FallbackGasPrice -```toml -FallbackGasPrice = '0.015' # Default -``` -FallbackGasPrice sets a fallback gas price to use when the estimator is not available. - -### GasToken -```toml -GasToken = 'ucosm' # Default -``` -GasToken is the token denomination which is being used to pay gas fees on this chain. - -### GasLimitMultiplier -```toml -GasLimitMultiplier = '1.5' # Default -``` -GasLimitMultiplier scales the estimated gas limit. - -### MaxMsgsPerBatch -```toml -MaxMsgsPerBatch = 100 # Default -``` -MaxMsgsPerBatch limits the numbers of messages per transaction batch. - -### OCR2CachePollPeriod -```toml -OCR2CachePollPeriod = '4s' # Default -``` -OCR2CachePollPeriod is the rate to poll for the OCR2 state cache. - -### OCR2CacheTTL -```toml -OCR2CacheTTL = '1m' # Default -``` -OCR2CacheTTL is the stale OCR2 cache deadline. - -### TxMsgTimeout -```toml -TxMsgTimeout = '10m' # Default -``` -TxMsgTimeout is the maximum age for resending transaction before they expire. - -## Cosmos.Nodes -```toml -[[Cosmos.Nodes]] -Name = 'primary' # Example -TendermintURL = 'http://tender.mint' # Example -``` - - -### Name -```toml -Name = 'primary' # Example -``` -Name is a unique (per-chain) identifier for this node. - -### TendermintURL -```toml -TendermintURL = 'http://tender.mint' # Example -``` -TendermintURL is the HTTP(S) tendermint endpoint for this node. - ## Solana ```toml [[Solana]] diff --git a/testdata/scripts/admin/profile/multi-chain-loopp.txtar b/testdata/scripts/admin/profile/multi-chain-loopp.txtar index cb289072a27..64ff5499f97 100644 --- a/testdata/scripts/admin/profile/multi-chain-loopp.txtar +++ b/testdata/scripts/admin/profile/multi-chain-loopp.txtar @@ -11,7 +11,7 @@ exec curl --retry 10 --retry-max-time 60 --retry-connrefused $NODEURL exec chainlink --remote-node-url $NODEURL admin login -file creds --bypass-version-check exec chainlink --remote-node-url $NODEURL admin profile -seconds 1 -output_dir ./profiles -stderr 'Collecting profiles from host and 8 plugins: \[allocs block cmdline goroutine heap mutex threadcreate profile trace\]' +stderr 'Collecting profiles from host and 7 plugins: \[allocs block cmdline goroutine heap mutex threadcreate profile trace\]' exec sh -c 'eval "ls -R $WORK"' @@ -19,7 +19,6 @@ exec sh -c 'eval "ls -R $WORK"' stdout $WORK/profiles/debuginfo-.*:$ stdout $WORK/profiles/debuginfo-[^/]*/plugins:$ stdout $WORK/profiles/debuginfo-[^/]*/plugins/aptos.42:$ -stdout $WORK/profiles/debuginfo-[^/]*/plugins/cosmos.Foo:$ stdout $WORK/profiles/debuginfo-[^/]*/plugins/evm.1:$ stdout $WORK/profiles/debuginfo-[^/]*/plugins/solana.Bar:$ stdout $WORK/profiles/debuginfo-[^/]*/plugins/starknet.Baz:$ @@ -52,13 +51,6 @@ ChainID = '42' Name = 'primary' URL = 'http://aptos.blockchain' -[[Cosmos]] -ChainID = 'Foo' - -[[Cosmos.Nodes]] -Name = 'primary' -TendermintURL = 'http://tender.mint' - [[EVM]] ChainID = '1' diff --git a/testdata/scripts/health/multi-chain-loopp.txtar b/testdata/scripts/health/multi-chain-loopp.txtar index 7248f6f2c02..9aadec23292 100644 --- a/testdata/scripts/health/multi-chain-loopp.txtar +++ b/testdata/scripts/health/multi-chain-loopp.txtar @@ -49,13 +49,6 @@ ChainID = '4' Name = 'primary' URL = 'http://aptos.blockchain' -[[Cosmos]] -ChainID = 'Foo' - -[[Cosmos.Nodes]] -Name = 'primary' -TendermintURL = 'http://tender.mint' - [[EVM]] ChainID = '1' @@ -123,13 +116,6 @@ ok Aptos.4.RelayerService.PluginRelayerClient.PluginAptos.PluginRelayerConfigEmi ok BridgeStatusReporter ok CRE ok CRE.DispatcherWrapper -ok Cosmos.Foo.RelayerService -ok Cosmos.Foo.RelayerService.PluginRelayerClient -ok Cosmos.Foo.RelayerService.PluginRelayerClient.PluginCosmos -ok Cosmos.Foo.RelayerService.PluginRelayerClient.PluginCosmos.Chain -ok Cosmos.Foo.RelayerService.PluginRelayerClient.PluginCosmos.PluginRelayerConfigEmitter -ok Cosmos.Foo.RelayerService.PluginRelayerClient.PluginCosmos.Relayer -ok Cosmos.Foo.RelayerService.PluginRelayerClient.PluginCosmos.Txm ok EVM.1.RelayerService ok EVM.1.RelayerService.PluginRelayerClient ok EVM.1.RelayerService.PluginRelayerClient.PluginEVM @@ -281,69 +267,6 @@ ok WorkflowStore "output": "" } }, - { - "type": "checks", - "id": "Cosmos.Foo.RelayerService", - "attributes": { - "name": "Cosmos.Foo.RelayerService", - "status": "passing", - "output": "" - } - }, - { - "type": "checks", - "id": "Cosmos.Foo.RelayerService.PluginRelayerClient", - "attributes": { - "name": "Cosmos.Foo.RelayerService.PluginRelayerClient", - "status": "passing", - "output": "" - } - }, - { - "type": "checks", - "id": "Cosmos.Foo.RelayerService.PluginRelayerClient.PluginCosmos", - "attributes": { - "name": "Cosmos.Foo.RelayerService.PluginRelayerClient.PluginCosmos", - "status": "passing", - "output": "" - } - }, - { - "type": "checks", - "id": "Cosmos.Foo.RelayerService.PluginRelayerClient.PluginCosmos.Chain", - "attributes": { - "name": "Cosmos.Foo.RelayerService.PluginRelayerClient.PluginCosmos.Chain", - "status": "passing", - "output": "" - } - }, - { - "type": "checks", - "id": "Cosmos.Foo.RelayerService.PluginRelayerClient.PluginCosmos.PluginRelayerConfigEmitter", - "attributes": { - "name": "Cosmos.Foo.RelayerService.PluginRelayerClient.PluginCosmos.PluginRelayerConfigEmitter", - "status": "passing", - "output": "" - } - }, - { - "type": "checks", - "id": "Cosmos.Foo.RelayerService.PluginRelayerClient.PluginCosmos.Relayer", - "attributes": { - "name": "Cosmos.Foo.RelayerService.PluginRelayerClient.PluginCosmos.Relayer", - "status": "passing", - "output": "" - } - }, - { - "type": "checks", - "id": "Cosmos.Foo.RelayerService.PluginRelayerClient.PluginCosmos.Txm", - "attributes": { - "name": "Cosmos.Foo.RelayerService.PluginRelayerClient.PluginCosmos.Txm", - "status": "passing", - "output": "" - } - }, { "type": "checks", "id": "EVM.1.RelayerService", diff --git a/testdata/scripts/node/validate/invalid-duplicates.txtar b/testdata/scripts/node/validate/invalid-duplicates.txtar index c45237d410d..87e83c90985 100644 --- a/testdata/scripts/node/validate/invalid-duplicates.txtar +++ b/testdata/scripts/node/validate/invalid-duplicates.txtar @@ -21,20 +21,6 @@ Name = 'fake' WSURL = 'wss://foo.bar/ws' HTTPURL = 'https://foo.bar' -[[Cosmos]] -ChainID = 'Malaga-420' - -[[Cosmos]] -ChainID = 'Malaga-420' - -[[Cosmos.Nodes]] -Name = 'primary' -TendermintURL = 'http://tender.mint' - -[[Cosmos.Nodes]] -Name = 'primary' -TendermintURL = 'http://tender.mint' - [[Solana]] ChainID = 'mainnet' @@ -87,15 +73,12 @@ Keystore = '' -- out.txt -- -- err.txt -- -Error running app: invalid configuration: 5 errors: +Error running app: invalid configuration: 4 errors: - EVM: 4 errors: - 1.ChainID: invalid value (1): duplicate - must be unique - 1.Nodes.1.Name: invalid value (fake): duplicate - must be unique - 1.Nodes.1.WSURL: invalid value (wss://foo.bar/ws): duplicate - must be unique - 1.Nodes.1.HTTPURL: invalid value (https://foo.bar): duplicate - must be unique - - Cosmos: 2 errors: - - 1.ChainID: invalid value (Malaga-420): duplicate - must be unique - - 1.Nodes.1.Name: invalid value (primary): duplicate - must be unique - Solana: 2 errors: - 1.ChainID: invalid value (mainnet): duplicate - must be unique - 1.Nodes.1.Name: invalid value (primary): duplicate - must be unique diff --git a/testdata/scripts/nodes/cosmos/help.txtar b/testdata/scripts/nodes/cosmos/help.txtar deleted file mode 100644 index 78939331b6b..00000000000 --- a/testdata/scripts/nodes/cosmos/help.txtar +++ /dev/null @@ -1,16 +0,0 @@ -exec chainlink nodes cosmos --help -cmp stdout out.txt - --- out.txt -- -NAME: - chainlink nodes cosmos - Commands for handling cosmos node configuration - -USAGE: - chainlink nodes cosmos command [command options] [arguments...] - -COMMANDS: - list List all existing cosmos nodes - -OPTIONS: - --help, -h show help - diff --git a/testdata/scripts/nodes/cosmos/list/help.txtar b/testdata/scripts/nodes/cosmos/list/help.txtar deleted file mode 100644 index 372693c704c..00000000000 --- a/testdata/scripts/nodes/cosmos/list/help.txtar +++ /dev/null @@ -1,9 +0,0 @@ -exec chainlink nodes cosmos list --help -cmp stdout out.txt - --- out.txt -- -NAME: - chainlink nodes cosmos list - List all existing cosmos nodes - -USAGE: - chainlink nodes cosmos list [arguments...] diff --git a/testdata/scripts/nodes/cosmos/list/list.txtar b/testdata/scripts/nodes/cosmos/list/list.txtar deleted file mode 100644 index af86445431c..00000000000 --- a/testdata/scripts/nodes/cosmos/list/list.txtar +++ /dev/null @@ -1,56 +0,0 @@ -# start node -exec sh -c 'eval "echo \"$(cat config.toml.tmpl)\" > config.toml"' -exec chainlink node -c config.toml start -p password -a creds & - -# initialize client -env NODEURL=http://localhost:$PORT -exec curl --retry 10 --retry-max-time 60 --retry-connrefused $NODEURL -exec chainlink --remote-node-url $NODEURL admin login -file creds --bypass-version-check - -exec chainlink --remote-node-url $NODEURL nodes cosmos list -cmp stdout out.txt - --- go:build.integration -- --- testdb.txt -- -CL_DATABASE_URL --- testport.txt -- -PORT - --- password -- -T.tLHkcmwePT/p,]sYuntjwHKAsrhm#4eRs4LuKHwvHejWYAC2JP4M8HimwgmbaZ --- creds -- -notreal@fakeemail.ch -fj293fbBnlQ!f9vNs - --- config.toml.tmpl -- -[Webserver] -HTTPPort = $PORT - -[[Cosmos]] -ChainID = '68472' - -[[Cosmos.Nodes]] -Name = 'Blue' -TendermintURL = 'wss://primaryfoo.bar' - -[[Cosmos.Nodes]] -Name = 'Yellow' -TendermintURL = 'wss://sendonlyfoo.bar' - --- out.txt -- - ---------------------------------------- -Name: Blue -Chain ID: 68472 -State: -Config: Name = 'Blue' -TendermintURL = 'wss://primaryfoo.bar' - ---------------------------------------- -Name: Yellow -Chain ID: 68472 -State: -Config: Name = 'Yellow' -TendermintURL = 'wss://sendonlyfoo.bar' - ---------------------------------------- From b29bd60801fae94196ef861f920580332f6179a5 Mon Sep 17 00:00:00 2001 From: Jordan Krage Date: Tue, 15 Sep 2026 15:53:46 -0600 Subject: [PATCH 4/4] remove cosmos commands --- .changeset/new-ants-hide.md | 5 + .mockery.yaml | 1 - core/capabilities/ccip/delegate.go | 2 - core/cmd/app.go | 2 - core/cmd/chains_commands_integration_test.go | 24 - core/cmd/cosmos_keys_commands.go | 57 --- core/cmd/cosmos_keys_commands_test.go | 175 ------- core/cmd/cosmos_transaction_commands.go | 122 ----- core/cmd/node_commands_integration_test.go | 50 -- core/cmd/shell_local.go | 9 - core/config/app_config.go | 1 - core/config/env/env.go | 1 - core/internal/cltest/cltest.go | 11 - .../testutils/cosmostest/cosmostest.go | 12 - core/services/chainlink/application.go | 3 - core/services/chainlink/config.go | 5 - core/services/chainlink/config_general.go | 13 - .../services/chainlink/config_general_test.go | 1 - core/services/chainlink/config_test.go | 1 - .../chainlink/mocks/general_config.go | 92 ---- core/services/chainlink/node_platform.go | 2 - .../chainlink/relayer_chain_interoperators.go | 17 - .../relayer_chain_interoperators_test.go | 9 +- core/services/chainlink/relayer_factory.go | 24 - core/services/chainlink/types.go | 1 - core/services/job/job_orm_test.go | 12 - core/services/job/orm.go | 5 - core/services/keystore/cosmos.go | 182 ------- core/services/keystore/cosmos_test.go | 113 ----- core/services/keystore/keystoretest.go | 1 - core/services/keystore/master.go | 10 - core/services/keystore/mocks/cosmos.go | 474 ------------------ core/services/keystore/mocks/master.go | 47 -- core/services/keystore/ocr2_test.go | 5 - core/services/relay/relay.go | 2 - core/store/models/cosmos/common.go | 15 - core/web/auth/auth_test.go | 10 - .../web/chains_controller_integration_test.go | 197 -------- core/web/cosmos_keys_controller.go | 12 - core/web/cosmos_keys_controller_test.go | 109 ---- core/web/cosmos_transfer_controller.go | 93 ---- core/web/presenters/chain_msg_test.go | 32 -- core/web/presenters/cosmos_key.go | 34 -- core/web/presenters/cosmos_msg.go | 24 - core/web/presenters/node_test.go | 2 +- core/web/resolver/cosmos_key.go | 43 -- core/web/resolver/cosmos_key_test.go | 74 --- core/web/resolver/ocr2_keys.go | 6 - core/web/resolver/ocr2_keys_test.go | 1 - core/web/resolver/query.go | 12 - core/web/resolver/resolver_test.go | 2 - core/web/router.go | 4 +- core/web/schema/schema.graphql | 1 - core/web/schema/type/cosmos_key.graphql | 7 - core/web/schema/type/ocr2_keys.graphql | 1 - .../environment/web/sdk/client/types.go | 1 - .../web/sdk/internal/generated/generated.go | 2 - .../web/sdk/internal/schema.graphql | 8 - testdata/scripts/chains/cosmos/help.txtar | 16 - .../scripts/chains/cosmos/list/help.txtar | 9 - testdata/scripts/chains/help.txtar | 1 - testdata/scripts/help-all/help-all.txtar | 12 - testdata/scripts/keys/cosmos/help.txtar | 20 - testdata/scripts/keys/help.txtar | 1 - testdata/scripts/nodes/help.txtar | 1 - testdata/scripts/txs/cosmos/create/help.txtar | 14 - testdata/scripts/txs/cosmos/help.txtar | 16 - testdata/scripts/txs/help.txtar | 1 - 68 files changed, 10 insertions(+), 2262 deletions(-) create mode 100644 .changeset/new-ants-hide.md delete mode 100644 core/cmd/cosmos_keys_commands.go delete mode 100644 core/cmd/cosmos_keys_commands_test.go delete mode 100644 core/cmd/cosmos_transaction_commands.go delete mode 100644 core/internal/testutils/cosmostest/cosmostest.go delete mode 100644 core/services/keystore/cosmos.go delete mode 100644 core/services/keystore/cosmos_test.go delete mode 100644 core/services/keystore/mocks/cosmos.go delete mode 100644 core/store/models/cosmos/common.go delete mode 100644 core/web/cosmos_keys_controller.go delete mode 100644 core/web/cosmos_keys_controller_test.go delete mode 100644 core/web/cosmos_transfer_controller.go delete mode 100644 core/web/presenters/cosmos_key.go delete mode 100644 core/web/presenters/cosmos_msg.go delete mode 100644 core/web/resolver/cosmos_key.go delete mode 100644 core/web/resolver/cosmos_key_test.go delete mode 100644 core/web/schema/type/cosmos_key.graphql delete mode 100644 testdata/scripts/chains/cosmos/help.txtar delete mode 100644 testdata/scripts/chains/cosmos/list/help.txtar delete mode 100644 testdata/scripts/keys/cosmos/help.txtar delete mode 100644 testdata/scripts/txs/cosmos/create/help.txtar delete mode 100644 testdata/scripts/txs/cosmos/help.txtar diff --git a/.changeset/new-ants-hide.md b/.changeset/new-ants-hide.md new file mode 100644 index 00000000000..d5d95415177 --- /dev/null +++ b/.changeset/new-ants-hide.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +Removing deprecated Cosmos support #nops #removed diff --git a/.mockery.yaml b/.mockery.yaml index 62530756e33..4ef1f9853e6 100644 --- a/.mockery.yaml +++ b/.mockery.yaml @@ -156,7 +156,6 @@ packages: github.com/smartcontractkit/chainlink/v2/core/services/keystore: interfaces: Aptos: - Cosmos: CSA: Eth: Master: diff --git a/core/capabilities/ccip/delegate.go b/core/capabilities/ccip/delegate.go index 17b808eb267..08cf923ac85 100644 --- a/core/capabilities/ccip/delegate.go +++ b/core/capabilities/ccip/delegate.go @@ -330,8 +330,6 @@ func (d *Delegate) getTransmitterKeys(ctx context.Context, relayIDs []types.Rela keys, err = getKeys(d.keystore.Solana()) case relay.NetworkAptos: keys, err = getKeys(d.keystore.Aptos()) - case relay.NetworkCosmos: - keys, err = getKeys(d.keystore.Cosmos()) case relay.NetworkStarkNet: keys, err = getKeys(d.keystore.StarkNet()) case relay.NetworkTON: diff --git a/core/cmd/app.go b/core/cmd/app.go index f9d817e9d5e..9f31b8d4b2b 100644 --- a/core/cmd/app.go +++ b/core/cmd/app.go @@ -202,7 +202,6 @@ func NewApp(s *Shell) *cli.App { initOCRKeysSubCmd(s), initOCR2KeysSubCmd(s), - keysCommand("Cosmos", NewCosmosKeysClient(s)), keysCommand("Solana", NewSolanaKeysClient(s)), keysCommand("StarkNet", NewStarkNetKeysClient(s)), keysCommand("Aptos", NewAptosKeysClient(s)), @@ -306,7 +305,6 @@ func NewApp(s *Shell) *cli.App { Usage: "Commands for handling transactions", Subcommands: []cli.Command{ initEVMTxSubCmd(s), - initCosmosTxSubCmd(s), initSolanaTxSubCmd(s), }, }, diff --git a/core/cmd/chains_commands_integration_test.go b/core/cmd/chains_commands_integration_test.go index d3ebfbcea73..e81e5871079 100644 --- a/core/cmd/chains_commands_integration_test.go +++ b/core/cmd/chains_commands_integration_test.go @@ -10,34 +10,10 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/cmd" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" - "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/cosmostest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/solanatest" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" ) -func TestShell_IndexCosmosChains(t *testing.T) { - t.Skip("cosmos has been deprecated") - t.Parallel() - - chainID := cosmostest.RandomChainID() - chain := chainlink.RawConfig{ - "ChainID": chainID, - "Nodes": []map[string]any{{ - "Name": "primary", - "TendermintURL": "http://tender.mint", - }}, - } - app := cosmosStartNewApplication(t, chain) - client, r := app.NewShellAndRenderer() - - require.NoError(t, cmd.NewChainClient(client, "cosmos").IndexChains(cltest.EmptyCLIContext())) - chains := *r.Renders[0].(*cmd.ChainPresenters) - require.Len(t, chains, 1) - c := chains[0] - assert.Equal(t, chainID, c.ID) - assertTableRenders(t, r) -} - func TestShell_IndexSolanaChains(t *testing.T) { t.Parallel() diff --git a/core/cmd/cosmos_keys_commands.go b/core/cmd/cosmos_keys_commands.go deleted file mode 100644 index 9f98f415f93..00000000000 --- a/core/cmd/cosmos_keys_commands.go +++ /dev/null @@ -1,57 +0,0 @@ -package cmd - -import ( - "github.com/smartcontractkit/chainlink-common/keystore/corekeys/cosmoskey" - "github.com/smartcontractkit/chainlink-common/pkg/utils" - "github.com/smartcontractkit/chainlink/v2/core/web/presenters" -) - -type CosmosKeyPresenter struct { - JAID - presenters.CosmosKeyResource -} - -// RenderTable implements TableRenderer -func (p CosmosKeyPresenter) RenderTable(rt RendererTable) error { - headers := []string{"ID", "Public key"} - rows := [][]string{p.ToRow()} - - if _, err := rt.Write([]byte("🔑 Cosmos Keys\n")); err != nil { - return err - } - renderList(headers, rows, rt.Writer) - - return utils.JustError(rt.Write([]byte("\n"))) -} - -func (p CosmosKeyPresenter) ToRow() []string { - row := []string{ - p.ID, - p.PubKey, - } - - return row -} - -type CosmosKeyPresenters []CosmosKeyPresenter - -// RenderTable implements TableRenderer -func (ps CosmosKeyPresenters) RenderTable(rt RendererTable) error { - headers := []string{"ID", "Public key"} - rows := make([][]string, 0, len(ps)) - - for _, p := range ps { - rows = append(rows, p.ToRow()) - } - - if _, err := rt.Write([]byte("🔑 Cosmos Keys\n")); err != nil { - return err - } - renderList(headers, rows, rt.Writer) - - return utils.JustError(rt.Write([]byte("\n"))) -} - -func NewCosmosKeysClient(s *Shell) KeysClient { - return newKeysClient[cosmoskey.Key, CosmosKeyPresenter, CosmosKeyPresenters]("Cosmos", s) -} diff --git a/core/cmd/cosmos_keys_commands_test.go b/core/cmd/cosmos_keys_commands_test.go deleted file mode 100644 index 7ea84ca3799..00000000000 --- a/core/cmd/cosmos_keys_commands_test.go +++ /dev/null @@ -1,175 +0,0 @@ -package cmd_test - -import ( - "bytes" - "flag" - "os" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "github.com/urfave/cli" - - "github.com/smartcontractkit/chainlink-common/keystore/corekeys/cosmoskey" - "github.com/smartcontractkit/chainlink-common/pkg/utils" - "github.com/smartcontractkit/chainlink/v2/core/cmd" - "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" - "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" - "github.com/smartcontractkit/chainlink/v2/core/web/presenters" -) - -func TestCosmosKeyPresenter_RenderTable(t *testing.T) { - t.Skip("cosmos has been deprecated") - t.Parallel() - - var ( - id = "1" - pubKey = "somepubkey" - buffer = bytes.NewBufferString("") - r = cmd.RendererTable{Writer: buffer} - ) - - p := cmd.CosmosKeyPresenter{ - JAID: cmd.JAID{ID: id}, - CosmosKeyResource: presenters.CosmosKeyResource{ - JAID: presenters.NewJAID(id), - PubKey: pubKey, - }, - } - - // Render a single resource - require.NoError(t, p.RenderTable(r)) - - output := buffer.String() - assert.Contains(t, output, id) - assert.Contains(t, output, pubKey) - - // Render many resources - buffer.Reset() - ps := cmd.CosmosKeyPresenters{p} - require.NoError(t, ps.RenderTable(r)) - - output = buffer.String() - assert.Contains(t, output, id) - assert.Contains(t, output, pubKey) -} - -func TestShell_CosmosKeys(t *testing.T) { - t.Skip("cosmos has been deprecated") - app := startNewApplicationV2(t, nil) - ks := app.GetKeyStore().Cosmos() - cleanup := func() { - ctx := t.Context() - keys, err := ks.GetAll() - require.NoError(t, err) - for _, key := range keys { - require.NoError(t, utils.JustError(ks.Delete(ctx, key.ID()))) - } - requireCosmosKeyCount(t, app, 0) - } - - t.Run("ListCosmosKeys", func(tt *testing.T) { - defer cleanup() - ctx := t.Context() - client, r := app.NewShellAndRenderer() - key, err := app.GetKeyStore().Cosmos().Create(ctx) - require.NoError(t, err) - requireCosmosKeyCount(t, app, 1) - require.NoError(t, cmd.NewCosmosKeysClient(client).ListKeys(cltest.EmptyCLIContext())) - require.Len(t, r.Renders, 1) - keys := *r.Renders[0].(*cmd.CosmosKeyPresenters) - assert.Equal(t, key.PublicKeyStr(), keys[0].PubKey) - }) - - t.Run("CreateCosmosKey", func(tt *testing.T) { - defer cleanup() - client, _ := app.NewShellAndRenderer() - require.NoError(t, cmd.NewCosmosKeysClient(client).CreateKey(nilContext)) - keys, err := app.GetKeyStore().Cosmos().GetAll() - require.NoError(t, err) - require.Len(t, keys, 1) - }) - - t.Run("DeleteCosmosKey", func(tt *testing.T) { - defer cleanup() - ctx := t.Context() - client, _ := app.NewShellAndRenderer() - key, err := app.GetKeyStore().Cosmos().Create(ctx) - require.NoError(t, err) - requireCosmosKeyCount(t, app, 1) - set := flag.NewFlagSet("test", 0) - flagSetApplyFromAction(cmd.NewCosmosKeysClient(client).DeleteKey, set, "cosmos") - - strID := key.ID() - require.NoError(tt, set.Set("yes", "true")) - require.NoError(tt, set.Parse([]string{strID})) - - c := cli.NewContext(nil, set, nil) - err = cmd.NewCosmosKeysClient(client).DeleteKey(c) - require.NoError(t, err) - requireCosmosKeyCount(t, app, 0) - }) - - t.Run("ImportExportCosmosKey", func(tt *testing.T) { - defer cleanup() - defer deleteKeyExportFile(t) - ctx := t.Context() - client, _ := app.NewShellAndRenderer() - - _, err := app.GetKeyStore().Cosmos().Create(ctx) - require.NoError(t, err) - - keys := requireCosmosKeyCount(t, app, 1) - key := keys[0] - keyName := keyNameForTest(t) - - // Export test invalid id - set := flag.NewFlagSet("test Cosmos export", 0) - flagSetApplyFromAction(cmd.NewCosmosKeysClient(client).ExportKey, set, "cosmos") - - require.NoError(tt, set.Parse([]string{"0"})) - require.NoError(tt, set.Set("new-password", "../internal/fixtures/incorrect_password.txt")) - require.NoError(tt, set.Set("output", keyName)) - - c := cli.NewContext(nil, set, nil) - tclient := cmd.NewCosmosKeysClient(client) - err = tclient.ExportKey(c) - require.Error(t, err, "Error exporting") - require.Error(t, utils.JustError(os.Stat(keyName))) - - // Export test - set = flag.NewFlagSet("test Cosmos export", 0) - flagSetApplyFromAction(cmd.NewCosmosKeysClient(client).ExportKey, set, "cosmos") - - require.NoError(tt, set.Parse([]string{key.ID()})) - require.NoError(tt, set.Set("new-password", "../internal/fixtures/incorrect_password.txt")) - require.NoError(tt, set.Set("output", keyName)) - - c = cli.NewContext(nil, set, nil) - - require.NoError(t, tclient.ExportKey(c)) - require.NoError(t, utils.JustError(os.Stat(keyName))) - - require.NoError(t, utils.JustError(app.GetKeyStore().Cosmos().Delete(ctx, key.ID()))) - requireCosmosKeyCount(t, app, 0) - - set = flag.NewFlagSet("test Cosmos import", 0) - flagSetApplyFromAction(cmd.NewCosmosKeysClient(client).ImportKey, set, "cosmos") - - require.NoError(tt, set.Parse([]string{keyName})) - require.NoError(tt, set.Set("old-password", "../internal/fixtures/incorrect_password.txt")) - - c = cli.NewContext(nil, set, nil) - require.NoError(t, tclient.ImportKey(c)) - - requireCosmosKeyCount(t, app, 1) - }) -} - -func requireCosmosKeyCount(t *testing.T, app chainlink.Application, length int) []cosmoskey.Key { - t.Helper() - keys, err := app.GetKeyStore().Cosmos().GetAll() - require.NoError(t, err) - require.Len(t, keys, length) - return keys -} diff --git a/core/cmd/cosmos_transaction_commands.go b/core/cmd/cosmos_transaction_commands.go deleted file mode 100644 index ceac098ec0f..00000000000 --- a/core/cmd/cosmos_transaction_commands.go +++ /dev/null @@ -1,122 +0,0 @@ -package cmd - -import ( - "bytes" - "encoding/json" - "errors" - "fmt" - "math/big" - - "github.com/urfave/cli" - - "github.com/smartcontractkit/chainlink/v2/core/store/models/cosmos" - "github.com/smartcontractkit/chainlink/v2/core/web/presenters" -) - -func initCosmosTxSubCmd(s *Shell) cli.Command { - return cli.Command{ - Name: "cosmos", - Usage: "Commands for handling Cosmos transactions", - Subcommands: []cli.Command{ - { - Name: "create", - Usage: "Send of from node Cosmos account to destination .", - Action: s.CosmosSendNativeToken, - Flags: []cli.Flag{ - cli.BoolFlag{ - Name: "force", - Usage: "allows to send a higher amount than the account's balance", - }, - cli.StringFlag{ - Name: "id", - Usage: "chain ID", - }, - }, - }, - }, - } -} - -type CosmosMsgPresenter struct { - JAID - presenters.CosmosMsgResource -} - -// RenderTable implements TableRenderer -func (p *CosmosMsgPresenter) RenderTable(rt RendererTable) error { - table := rt.newTable([]string{"Chain ID", "Contract ID", "State", "Tx Hash"}) - var hash string - if p.TxHash != nil { - hash = *p.TxHash - } - table.Append([]string{ - p.ChainID, - p.ContractID, - p.State, - hash, - }) - - return render(fmt.Sprintf("Cosmos Message %v", p.ID), table) -} - -// CosmosSendNativeToken transfers coins from the node's account to a specified address. -func (s *Shell) CosmosSendNativeToken(c *cli.Context) (err error) { - if c.NArg() < 3 { - return s.errorOut(errors.New("four arguments expected: token, amount, fromAddress and toAddress")) - } - - token := c.Args().Get(0) - if token == "" { - return s.errorOut(errors.New("missing token")) - } - - unparsedAmount := c.Args().Get(1) - amount, ok := new(big.Int).SetString(unparsedAmount, 10) - if !ok { - return s.errorOut(fmt.Errorf("invalid int: %s", unparsedAmount)) - } - - unparsedFromAddress := c.Args().Get(2) - if unparsedFromAddress == "" { - return s.errorOut(errors.New("missing from address")) - } - - unparsedDestinationAddress := c.Args().Get(3) - if unparsedDestinationAddress == "" { - return s.errorOut(errors.New("missing destination address")) - } - - chainID := c.String("id") - if chainID == "" { - return s.errorOut(errors.New("missing id")) - } - - request := cosmos.SendRequest{ - DestinationAddress: unparsedDestinationAddress, - FromAddress: unparsedFromAddress, - Amount: amount, - CosmosChainID: chainID, - Token: token, - AllowHigherAmounts: c.IsSet("force"), - } - - requestData, err := json.Marshal(request) - if err != nil { - return s.errorOut(err) - } - - buf := bytes.NewBuffer(requestData) - - resp, err := s.HTTP.Post(s.ctx(), "/v2/transfers/cosmos", buf) - if err != nil { - return s.errorOut(err) - } - defer func() { - if cerr := resp.Body.Close(); cerr != nil { - err = errors.Join(err, cerr) - } - }() - - err = s.renderAPIResponse(resp, &CosmosMsgPresenter{}) - return err -} diff --git a/core/cmd/node_commands_integration_test.go b/core/cmd/node_commands_integration_test.go index 1ebb928c60c..c3493aac365 100644 --- a/core/cmd/node_commands_integration_test.go +++ b/core/cmd/node_commands_integration_test.go @@ -14,18 +14,10 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/config" "github.com/smartcontractkit/chainlink/v2/core/cmd" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" - "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/cosmostest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/solanatest" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" ) -func cosmosStartNewApplication(t *testing.T, cfgs ...chainlink.RawConfig) *cltest.TestApplication { - return startNewApplicationV2(t, func(c *chainlink.Config, s *chainlink.Secrets) { - c.Cosmos = cfgs - c.EVM = nil - }) -} - func solanaStartNewApplication(t *testing.T, cfgs ...chainlink.RawConfig) *cltest.TestApplication { return startNewApplicationV2(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.Solana = cfgs @@ -33,48 +25,6 @@ func solanaStartNewApplication(t *testing.T, cfgs ...chainlink.RawConfig) *cltes }) } -func TestShell_IndexCosmosNodes(t *testing.T) { - t.Skip("cosmos has been deprecated") - t.Parallel() - - chainID := cosmostest.RandomChainID() - node := map[string]any{ - "Name": new("second"), - "TendermintURL": config.MustParseURL("http://tender.mint.test/bombay-12"), - } - chain := chainlink.RawConfig{ - "ChainID": chainID, - "Nodes": []any{node}, - } - app := cosmosStartNewApplication(t, chain) - client, r := app.NewShellAndRenderer() - require.NoError(t, cmd.NewNodeClient(client, "cosmos").IndexNodes(cltest.EmptyCLIContext())) - require.NotEmpty(t, r.Renders) - nodes := *r.Renders[0].(*cmd.NodePresenters) - require.Len(t, nodes, 1) - n := nodes[0] - assert.Equal(t, cltest.FormatWithPrefixedChainID(chainID, "second"), n.ID) - assert.Equal(t, chainID, n.ChainID) - assert.Equal(t, "second", n.Name) - wantConfig, err := toml.Marshal(node) - require.NoError(t, err) - assert.Equal(t, string(wantConfig), n.Config) - assertTableRenders(t, r) - - // Render table and check the fields order - b := new(bytes.Buffer) - rt := cmd.RendererTable{b} - require.NoError(t, nodes.RenderTable(rt)) - renderLines := strings.Split(b.String(), "\n") - assert.Len(t, renderLines, 10) - assert.Contains(t, renderLines[2], "Name") - assert.Contains(t, renderLines[2], n.Name) - assert.Contains(t, renderLines[3], "Chain ID") - assert.Contains(t, renderLines[3], n.ChainID) - assert.Contains(t, renderLines[4], "State") - assert.Contains(t, renderLines[4], n.State) -} - func starknetStartNewApplication(t *testing.T, cfgs ...chainlink.RawConfig) *cltest.TestApplication { return startNewApplicationV2(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.Starknet = cfgs diff --git a/core/cmd/shell_local.go b/core/cmd/shell_local.go index c3ea183e6d3..69a6ee84ea7 100644 --- a/core/cmd/shell_local.go +++ b/core/cmd/shell_local.go @@ -475,9 +475,6 @@ func (s *Shell) runNode(c *cli.Context) error { if s.Config.EVMEnabled() { enabledChains = append(enabledChains, corekeys.EVM) } - if s.Config.CosmosEnabled() { - enabledChains = append(enabledChains, corekeys.Cosmos) - } if s.Config.SolanaEnabled() { enabledChains = append(enabledChains, corekeys.Solana) } @@ -520,12 +517,6 @@ func (s *Shell) runNode(c *cli.Context) error { return fmt.Errorf("failed to ensure p2p key: %w", err2) } } - if s.Config.CosmosEnabled() { - err2 := app.GetKeyStore().Cosmos().EnsureKey(rootCtx) - if err2 != nil { - return fmt.Errorf("failed to ensure cosmos key: %w", err2) - } - } if s.Config.SolanaEnabled() { for _, k := range s.Config.ImportedSolKeys().List() { lggr.Debug("Importing sol key") diff --git a/core/config/app_config.go b/core/config/app_config.go index 3632308cd72..cdc63c83f15 100644 --- a/core/config/app_config.go +++ b/core/config/app_config.go @@ -22,7 +22,6 @@ type AppConfig interface { ShutdownGracePeriod() time.Duration InsecureFastScrypt() bool EVMEnabled() bool - CosmosEnabled() bool SolanaEnabled() bool StarkNetEnabled() bool AptosEnabled() bool diff --git a/core/config/env/env.go b/core/config/env/env.go index a1a7cb3d4cb..568f0d9974b 100644 --- a/core/config/env/env.go +++ b/core/config/env/env.go @@ -31,7 +31,6 @@ var ( MedianPlugin = NewPlugin("median") AptosPlugin = NewPlugin("aptos") EVMPlugin = NewPlugin("evm") - CosmosPlugin = NewPlugin("cosmos") SolanaPlugin = NewPlugin("solana") StarknetPlugin = NewPlugin("starknet") TronPlugin = NewPlugin("tron") diff --git a/core/internal/cltest/cltest.go b/core/internal/cltest/cltest.go index 88e08b7224c..04d4643cd50 100644 --- a/core/internal/cltest/cltest.go +++ b/core/internal/cltest/cltest.go @@ -41,7 +41,6 @@ import ( commonkeystore "github.com/smartcontractkit/chainlink-common/keystore" "github.com/smartcontractkit/chainlink-common/keystore/corekeys/aptoskey" - "github.com/smartcontractkit/chainlink-common/keystore/corekeys/cosmoskey" "github.com/smartcontractkit/chainlink-common/keystore/corekeys/csakey" "github.com/smartcontractkit/chainlink-common/keystore/corekeys/ethkey" "github.com/smartcontractkit/chainlink-common/keystore/corekeys/ocr2key" @@ -124,7 +123,6 @@ var ( DefaultP2PPeerID p2pkey.PeerID FixtureChainID = *testutils.FixtureChainID - DefaultCosmosKey = cosmoskey.MustNewInsecure(keystest.NewRandReaderFromSeed(KeyBigIntSeed)) DefaultCSAKey = csakey.MustNewV2XXXTestingOnly(big.NewInt(KeyBigIntSeed)) DefaultOCRKey = ocrkey.MustNewV2XXXTestingOnly(big.NewInt(KeyBigIntSeed)) DefaultOCR2Key = ocr2key.MustNewInsecure(keystest.NewRandReaderFromSeed(KeyBigIntSeed), "evm") @@ -475,12 +473,6 @@ func logPubKeys(t testing.TB, kr keystore.Master) { for _, P2PKey := range p2ps { p2pIDs = append(p2pIDs, P2PKey.ID()) } - cosmos, err := kr.Cosmos().GetAll() - require.NoError(t, err) - cosmosIDs := make([]string, len(cosmos)) - for _, cosmosKey := range cosmos { - cosmosIDs = append(cosmosIDs, cosmosKey.ID()) - } solanas, err := kr.Solana().GetAll() require.NoError(t, err) solanaIDs := make([]string, len(solanas)) @@ -547,9 +539,6 @@ func logPubKeys(t testing.TB, kr keystore.Master) { if len(p2pIDs) > 0 { lggr.Infow(fmt.Sprintf("Unlocked %d P2P keys", len(p2pIDs)), "keys", p2pIDs) } - if len(cosmosIDs) > 0 { - lggr.Infow(fmt.Sprintf("Unlocked %d Cosmos keys", len(cosmosIDs)), "keys", cosmosIDs) - } if len(solanaIDs) > 0 { lggr.Infow(fmt.Sprintf("Unlocked %d Solana keys", len(solanaIDs)), "keys", solanaIDs) } diff --git a/core/internal/testutils/cosmostest/cosmostest.go b/core/internal/testutils/cosmostest/cosmostest.go deleted file mode 100644 index 5a77b034cac..00000000000 --- a/core/internal/testutils/cosmostest/cosmostest.go +++ /dev/null @@ -1,12 +0,0 @@ -package cosmostest - -import ( - "fmt" - - "github.com/google/uuid" -) - -// RandomChainID returns a random chain id for testing. Use this instead of a constant to prevent DB collisions. -func RandomChainID() string { - return fmt.Sprintf("Chainlinktest-%s", uuid.New()) -} diff --git a/core/services/chainlink/application.go b/core/services/chainlink/application.go index 76710f1715b..6b19ef764b1 100644 --- a/core/services/chainlink/application.go +++ b/core/services/chainlink/application.go @@ -359,9 +359,6 @@ func NewApplication(ctx context.Context, opts ApplicationOpts) (Application, err // TODO BCF-2510 this needs to change in order to clear the path for EVM extraction initOps := []CoreRelayerChainInitFunc{InitDummy(relayerFactory), InitEVM(relayerFactory, evmFactoryCfg)} - if cfg.CosmosEnabled() { - initOps = append(initOps, InitCosmos(relayerFactory, keyStore.Cosmos(), keyStore.CSA(), cfg.CosmosConfigs())) - } if cfg.SolanaEnabled() { initOps = append(initOps, InitSolana(relayerFactory, keyStore.Solana(), keyStore.CSA(), cfg.SolanaConfigs())) } diff --git a/core/services/chainlink/config.go b/core/services/chainlink/config.go index df3b0637df8..6ace8b45509 100644 --- a/core/services/chainlink/config.go +++ b/core/services/chainlink/config.go @@ -32,8 +32,6 @@ type Config struct { EVM configtoml.EVMConfigs `toml:",omitempty"` - Cosmos RawConfigs `toml:",omitempty"` - Solana RawConfigs `toml:",omitempty"` Starknet RawConfigs `toml:",omitempty"` @@ -331,8 +329,6 @@ func (c *Config) setDefaults() { } } - c.Cosmos.SetDefaults() - c.Solana.SetDefaults() c.Starknet.SetDefaults() @@ -356,7 +352,6 @@ func (c *Config) SetFrom(f *Config) (err error) { } appendErr(c.EVM.SetFrom(&f.EVM), "EVM") - appendErr(c.Cosmos.SetFrom(f.Cosmos), "Cosmos") appendErr(c.Solana.SetFrom(f.Solana), "Solana") appendErr(c.Starknet.SetFrom(f.Starknet), "Starknet") appendErr(c.Aptos.SetFrom(f.Aptos), "Aptos") diff --git a/core/services/chainlink/config_general.go b/core/services/chainlink/config_general.go index d787f016dca..9f6ab5c8978 100644 --- a/core/services/chainlink/config_general.go +++ b/core/services/chainlink/config_general.go @@ -196,10 +196,6 @@ func (g *generalConfig) EVMConfigs() evmcfg.EVMConfigs { return g.c.EVM } -func (g *generalConfig) CosmosConfigs() RawConfigs { - return g.c.Cosmos -} - func (g *generalConfig) SolanaConfigs() RawConfigs { return g.c.Solana } @@ -330,15 +326,6 @@ func (g *generalConfig) SolanaEnabled() bool { return false } -func (g *generalConfig) CosmosEnabled() bool { - for _, c := range g.c.Cosmos { - if c.IsEnabled() { - return true - } - } - return false -} - func (g *generalConfig) StarkNetEnabled() bool { for _, c := range g.c.Starknet { if c.IsEnabled() { diff --git a/core/services/chainlink/config_general_test.go b/core/services/chainlink/config_general_test.go index e610b7a6921..20fbe8b6f3c 100644 --- a/core/services/chainlink/config_general_test.go +++ b/core/services/chainlink/config_general_test.go @@ -25,7 +25,6 @@ func TestTOMLGeneralConfig_Defaults(t *testing.T) { assert.Equal(t, (*url.URL)(nil), config.WebServer().BridgeResponseURL()) assert.False(t, config.EVMConfigs().RPCEnabled()) assert.False(t, config.EVMEnabled()) - assert.False(t, config.CosmosEnabled()) assert.False(t, config.SolanaEnabled()) assert.False(t, config.StarkNetEnabled()) assert.False(t, config.TronEnabled()) diff --git a/core/services/chainlink/config_test.go b/core/services/chainlink/config_test.go index 11617a490fe..e822aeacd2a 100644 --- a/core/services/chainlink/config_test.go +++ b/core/services/chainlink/config_test.go @@ -1751,7 +1751,6 @@ func assertValidationError(t *testing.T, invalid interface{ Validate() error }, func TestConfig_setDefaults(t *testing.T) { var c Config c.EVM = evmcfg.EVMConfigs{{ChainID: sqlutil.NewI(99999133712345)}} - c.Cosmos = RawConfigs{{"ChainID": new("unknown cosmos chain")}} c.Solana = RawConfigs{{"ChainID": new("unknown solana chain")}} c.Starknet = RawConfigs{{"ChainID": new("unknown starknet chain")}} c.setDefaults() diff --git a/core/services/chainlink/mocks/general_config.go b/core/services/chainlink/mocks/general_config.go index 8f2b34a2ccf..d4407957c15 100644 --- a/core/services/chainlink/mocks/general_config.go +++ b/core/services/chainlink/mocks/general_config.go @@ -555,98 +555,6 @@ func (_c *GeneralConfig_ConfigTOML_Call) RunAndReturn(run func() (string, string return _c } -// CosmosConfigs provides a mock function with no fields -func (_m *GeneralConfig) CosmosConfigs() chainlink.RawConfigs { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for CosmosConfigs") - } - - var r0 chainlink.RawConfigs - if rf, ok := ret.Get(0).(func() chainlink.RawConfigs); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(chainlink.RawConfigs) - } - } - - return r0 -} - -// GeneralConfig_CosmosConfigs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CosmosConfigs' -type GeneralConfig_CosmosConfigs_Call struct { - *mock.Call -} - -// CosmosConfigs is a helper method to define mock.On call -func (_e *GeneralConfig_Expecter) CosmosConfigs() *GeneralConfig_CosmosConfigs_Call { - return &GeneralConfig_CosmosConfigs_Call{Call: _e.mock.On("CosmosConfigs")} -} - -func (_c *GeneralConfig_CosmosConfigs_Call) Run(run func()) *GeneralConfig_CosmosConfigs_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *GeneralConfig_CosmosConfigs_Call) Return(_a0 chainlink.RawConfigs) *GeneralConfig_CosmosConfigs_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *GeneralConfig_CosmosConfigs_Call) RunAndReturn(run func() chainlink.RawConfigs) *GeneralConfig_CosmosConfigs_Call { - _c.Call.Return(run) - return _c -} - -// CosmosEnabled provides a mock function with no fields -func (_m *GeneralConfig) CosmosEnabled() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for CosmosEnabled") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// GeneralConfig_CosmosEnabled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CosmosEnabled' -type GeneralConfig_CosmosEnabled_Call struct { - *mock.Call -} - -// CosmosEnabled is a helper method to define mock.On call -func (_e *GeneralConfig_Expecter) CosmosEnabled() *GeneralConfig_CosmosEnabled_Call { - return &GeneralConfig_CosmosEnabled_Call{Call: _e.mock.On("CosmosEnabled")} -} - -func (_c *GeneralConfig_CosmosEnabled_Call) Run(run func()) *GeneralConfig_CosmosEnabled_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *GeneralConfig_CosmosEnabled_Call) Return(_a0 bool) *GeneralConfig_CosmosEnabled_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *GeneralConfig_CosmosEnabled_Call) RunAndReturn(run func() bool) *GeneralConfig_CosmosEnabled_Call { - _c.Call.Return(run) - return _c -} - // Database provides a mock function with no fields func (_m *GeneralConfig) Database() config.Database { ret := _m.Called() diff --git a/core/services/chainlink/node_platform.go b/core/services/chainlink/node_platform.go index 03318a8b41f..40fa8f4c28b 100644 --- a/core/services/chainlink/node_platform.go +++ b/core/services/chainlink/node_platform.go @@ -242,8 +242,6 @@ func (r nodePlatformSubmitterKeyReader) submitterKeysForRelay(ctx context.Contex return nodePlatformKeyIDs(r.keyStore.Solana()) case relay.NetworkAptos: return nodePlatformKeyIDs(r.keyStore.Aptos()) - case relay.NetworkCosmos: - return nodePlatformKeyIDs(r.keyStore.Cosmos()) case relay.NetworkStarkNet: return nodePlatformKeyIDs(r.keyStore.StarkNet()) case relay.NetworkTON: diff --git a/core/services/chainlink/relayer_chain_interoperators.go b/core/services/chainlink/relayer_chain_interoperators.go index 95bb4b816de..489a25b265d 100644 --- a/core/services/chainlink/relayer_chain_interoperators.go +++ b/core/services/chainlink/relayer_chain_interoperators.go @@ -140,23 +140,6 @@ func InitEVM(factory RelayerFactory, config EVMFactoryConfig) CoreRelayerChainIn } } -// InitCosmos is a option for instantiating Cosmos relayers -func InitCosmos(factory RelayerFactory, ks keystore.Cosmos, csaKS keystore.CSA, chainCfgs RawConfigs) CoreRelayerChainInitFunc { - return func(op *CoreRelayerChainInteroperators) (err error) { - loopKs := &keystore.CosmosLoopSigner{Cosmos: ks} - relayers, err := factory.NewCosmos(loopKs, &keystore.CSASigner{CSA: csaKS}, chainCfgs) - if err != nil { - return fmt.Errorf("failed to setup Cosmos relayer: %w", err) - } - for id, relayer := range relayers { - op.srvs = append(op.srvs, relayer) - op.loopRelayers[id] = relayer - } - - return nil - } -} - // InitSolana is a option for instantiating Solana relayers func InitSolana(factory RelayerFactory, ks keystore.Solana, csaKS keystore.CSA, chainCfgs RawConfigs) CoreRelayerChainInitFunc { return func(op *CoreRelayerChainInteroperators) error { diff --git a/core/services/chainlink/relayer_chain_interoperators_test.go b/core/services/chainlink/relayer_chain_interoperators_test.go index dbdad12f74b..59a27347172 100644 --- a/core/services/chainlink/relayer_chain_interoperators_test.go +++ b/core/services/chainlink/relayer_chain_interoperators_test.go @@ -10,7 +10,7 @@ import ( commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" "github.com/smartcontractkit/chainlink-common/pkg/loop" - sqlutil "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink-common/pkg/utils/mailbox" "github.com/smartcontractkit/chainlink-evm/pkg/chains/legacyevm" @@ -149,7 +149,6 @@ func TestCoreRelayerChainInteroperators(t *testing.T) { CSAKeystore: &keystore.CSASigner{CSA: keyStore.CSA()}, }), chainlink.InitStarknet(factory, keyStore.StarkNet(), keyStore.CSA(), cfg.StarknetConfigs()), - chainlink.InitCosmos(factory, keyStore.Cosmos(), keyStore.CSA(), cfg.CosmosConfigs()), chainlink.InitSolana(factory, keyStore.Solana(), keyStore.CSA(), cfg.SolanaConfigs()), }, expectedEVMChainCnt: 2, @@ -159,7 +158,7 @@ func TestCoreRelayerChainInteroperators(t *testing.T) { {Network: relay.NetworkEVM, ChainID: evmChainID2.String()}, }, - expectedRelayerNetworks: map[string]struct{}{relay.NetworkEVM: {}, relay.NetworkCosmos: {}, relay.NetworkSolana: {}, relay.NetworkStarkNet: {}}, + expectedRelayerNetworks: map[string]struct{}{relay.NetworkEVM: {}, relay.NetworkSolana: {}, relay.NetworkStarkNet: {}}, }, } for _, tt := range tests { @@ -196,8 +195,6 @@ func TestCoreRelayerChainInteroperators(t *testing.T) { switch relayNetwork { case relay.NetworkEVM: expectedChainCnt, expectedNodeCnt = tt.expectedEVMChainCnt, tt.expectedEVMNodeCnt - case relay.NetworkCosmos: - expectedChainCnt, expectedNodeCnt = tt.expectedCosmosChainCnt, tt.expectedCosmosNodeCnt case relay.NetworkSolana: expectedChainCnt, expectedNodeCnt = tt.expectedSolanaChainCnt, tt.expectedSolanaNodeCnt case relay.NetworkStarkNet: @@ -265,7 +262,7 @@ func TestCoreRelayerChainInteroperators(t *testing.T) { } } - expectedMissing := types.RelayID{Network: relay.NetworkCosmos, ChainID: "not a chain id"} + expectedMissing := types.RelayID{Network: relay.NetworkSolana, ChainID: "not a chain id"} unwanted, err := cr.Get(expectedMissing) assert.Nil(t, unwanted) assert.ErrorIs(t, err, chainlink.ErrNoSuchRelayer) diff --git a/core/services/chainlink/relayer_factory.go b/core/services/chainlink/relayer_factory.go index f0cd998b844..f790906476b 100644 --- a/core/services/chainlink/relayer_factory.go +++ b/core/services/chainlink/relayer_factory.go @@ -142,30 +142,6 @@ func (r *RelayerFactory) NewStarkNet(ks, ksCSA coretypes.Keystore, chainCfgs Raw return r.NewLOOPRelayer("StarkNet", relay.NetworkStarkNet, env.StarknetPlugin, ks, ksCSA, chainCfgs) } -type CosmosFactoryConfig struct { - Keystore keystore.Cosmos - TOMLConfigs RawConfigs -} - -func (c CosmosFactoryConfig) Validate() error { - var err error - if c.Keystore == nil { - err = errors.Join(err, errors.New("nil Keystore")) - } - if len(c.TOMLConfigs) == 0 { - err = errors.Join(err, errors.New("no CosmosConfigs provided")) - } - - if err != nil { - err = fmt.Errorf("invalid CosmosFactoryConfig: %w", err) - } - return err -} - -func (r *RelayerFactory) NewCosmos(ks, ksCSA coretypes.Keystore, chainCfgs RawConfigs) (map[types.RelayID]loop.Relayer, error) { - return r.NewLOOPRelayer("Cosmos", relay.NetworkCosmos, env.CosmosPlugin, ks, ksCSA, chainCfgs) -} - func (r *RelayerFactory) NewAptos(ks, ksCSA coretypes.Keystore, chainCfgs RawConfigs) (map[types.RelayID]loop.Relayer, error) { return r.NewLOOPRelayer("Aptos", relay.NetworkAptos, env.AptosPlugin, ks, ksCSA, chainCfgs) } diff --git a/core/services/chainlink/types.go b/core/services/chainlink/types.go index cee7e5bfe1a..e61cded6355 100644 --- a/core/services/chainlink/types.go +++ b/core/services/chainlink/types.go @@ -8,7 +8,6 @@ import ( type GeneralConfig interface { coreconfig.AppConfig toml.HasEVMConfigs - CosmosConfigs() RawConfigs SolanaConfigs() RawConfigs StarknetConfigs() RawConfigs AptosConfigs() RawConfigs diff --git a/core/services/job/job_orm_test.go b/core/services/job/job_orm_test.go index 63bdf9d1445..918a7873cd6 100644 --- a/core/services/job/job_orm_test.go +++ b/core/services/job/job_orm_test.go @@ -969,18 +969,6 @@ func TestORM_ValidateKeyStoreMatch(t *testing.T) { require.NoError(t, err) }) - t.Run("test Cosmos key validation", func(t *testing.T) { - ctx := t.Context() - jb.OCR2OracleSpec.Relay = relay.NetworkCosmos - err := job.ValidateKeyStoreMatch(ctx, jb.OCR2OracleSpec, keyStore, "bad key") - require.EqualError(t, err, "no Cosmos key matching: \"bad key\"") - - cosmosKey, err := keyStore.Cosmos().Create(ctx) - require.NoError(t, err) - err = job.ValidateKeyStoreMatch(ctx, jb.OCR2OracleSpec, keyStore, cosmosKey.ID()) - require.NoError(t, err) - }) - t.Run("test Solana key validation", func(t *testing.T) { ctx := t.Context() jb.OCR2OracleSpec.Relay = relay.NetworkSolana diff --git a/core/services/job/orm.go b/core/services/job/orm.go index 6f83d51d7a1..2739c015099 100644 --- a/core/services/job/orm.go +++ b/core/services/job/orm.go @@ -616,11 +616,6 @@ func validateKeyStoreMatchForRelay(ctx context.Context, network string, keyStore if err != nil { return errors.Errorf("no EVM key matching: %q", key) } - case relay.NetworkCosmos: - _, err := keyStore.Cosmos().Get(key) - if err != nil { - return errors.Errorf("no Cosmos key matching: %q", key) - } case relay.NetworkSolana: _, err := keyStore.Solana().Get(key) if err != nil { diff --git a/core/services/keystore/cosmos.go b/core/services/keystore/cosmos.go deleted file mode 100644 index 16608397e92..00000000000 --- a/core/services/keystore/cosmos.go +++ /dev/null @@ -1,182 +0,0 @@ -package keystore - -import ( - "context" - "fmt" - - "github.com/pkg/errors" - - "github.com/smartcontractkit/chainlink-common/keystore/corekeys/cosmoskey" - "github.com/smartcontractkit/chainlink-common/pkg/types/core" -) - -type Cosmos interface { - Get(id string) (cosmoskey.Key, error) - GetAll() ([]cosmoskey.Key, error) - Create(ctx context.Context) (cosmoskey.Key, error) - Add(ctx context.Context, key cosmoskey.Key) error - Delete(ctx context.Context, id string) (cosmoskey.Key, error) - Import(ctx context.Context, keyJSON []byte, password string) (cosmoskey.Key, error) - Export(id string, password string) ([]byte, error) - EnsureKey(ctx context.Context) error -} - -type cosmos struct { - *keyManager -} - -var _ Cosmos = &cosmos{} - -func newCosmosKeyStore(km *keyManager) *cosmos { - return &cosmos{ - km, - } -} - -func (ks *cosmos) Get(id string) (cosmoskey.Key, error) { - ks.lock.RLock() - defer ks.lock.RUnlock() - if ks.isLocked() { - return cosmoskey.Key{}, ErrLocked - } - return ks.getByID(id) -} - -func (ks *cosmos) GetAll() (keys []cosmoskey.Key, _ error) { - ks.lock.RLock() - defer ks.lock.RUnlock() - if ks.isLocked() { - return nil, ErrLocked - } - for _, key := range ks.keyRing.Cosmos { - keys = append(keys, key) - } - return keys, nil -} - -func (ks *cosmos) Create(ctx context.Context) (cosmoskey.Key, error) { - ks.lock.Lock() - defer ks.lock.Unlock() - if ks.isLocked() { - return cosmoskey.Key{}, ErrLocked - } - key := cosmoskey.New() - return key, ks.safeAddKey(ctx, key) -} - -func (ks *cosmos) Add(ctx context.Context, key cosmoskey.Key) error { - ks.lock.Lock() - defer ks.lock.Unlock() - if ks.isLocked() { - return ErrLocked - } - if _, found := ks.keyRing.Cosmos[key.ID()]; found { - return fmt.Errorf("key with ID %s already exists", key.ID()) - } - return ks.safeAddKey(ctx, key) -} - -func (ks *cosmos) Delete(ctx context.Context, id string) (cosmoskey.Key, error) { - ks.lock.Lock() - defer ks.lock.Unlock() - if ks.isLocked() { - return cosmoskey.Key{}, ErrLocked - } - key, err := ks.getByID(id) - if err != nil { - return cosmoskey.Key{}, err - } - err = ks.safeRemoveKey(ctx, key) - return key, err -} - -func (ks *cosmos) Import(ctx context.Context, keyJSON []byte, password string) (cosmoskey.Key, error) { - ks.lock.Lock() - defer ks.lock.Unlock() - if ks.isLocked() { - return cosmoskey.Key{}, ErrLocked - } - key, err := cosmoskey.FromEncryptedJSON(keyJSON, password) - if err != nil { - return cosmoskey.Key{}, errors.Wrap(err, "CosmosKeyStore#ImportKey failed to decrypt key") - } - if _, found := ks.keyRing.Cosmos[key.ID()]; found { - return cosmoskey.Key{}, fmt.Errorf("key with ID %s already exists", key.ID()) - } - return key, ks.safeAddKey(ctx, key) -} - -func (ks *cosmos) Export(id string, password string) ([]byte, error) { - ks.lock.RLock() - defer ks.lock.RUnlock() - if ks.isLocked() { - return nil, ErrLocked - } - key, err := ks.getByID(id) - if err != nil { - return nil, err - } - return key.ToEncryptedJSON(password, ks.scryptParams) -} - -func (ks *cosmos) EnsureKey(ctx context.Context) error { - ks.lock.Lock() - defer ks.lock.Unlock() - if ks.isLocked() { - return ErrLocked - } - - if len(ks.keyRing.Cosmos) > 0 { - return nil - } - - key := cosmoskey.New() - - ks.announce(key) - - return ks.safeAddKey(ctx, key) -} - -func (ks *cosmos) getByID(id string) (cosmoskey.Key, error) { - key, found := ks.keyRing.Cosmos[id] - if !found { - return cosmoskey.Key{}, KeyNotFoundError{ID: id, KeyType: "Cosmos"} - } - return key, nil -} - -// CosmosLoopSigner implements the [github.com/smartcontractkit/chainlink-common/pkg/loop.Keystore] interface and -// handles signing for Cosmos messages. -type CosmosLoopSigner struct { - Cosmos - core.UnimplementedKeystore -} - -var _ core.Keystore = &CosmosLoopSigner{} - -func (lk *CosmosLoopSigner) Sign(ctx context.Context, id string, hash []byte) ([]byte, error) { - k, err := lk.Get(id) - if err != nil { - return nil, err - } - // loopp spec requires passing nil hash to check existence of id - if hash == nil { - return nil, nil - } - - return k.Sign(hash) -} - -func (lk *CosmosLoopSigner) Accounts(ctx context.Context) ([]string, error) { - keys, err := lk.GetAll() - if err != nil { - return nil, err - } - - accounts := []string{} - for _, k := range keys { - accounts = append(accounts, k.ID()) - } - - return accounts, nil -} diff --git a/core/services/keystore/cosmos_test.go b/core/services/keystore/cosmos_test.go deleted file mode 100644 index cd40ee8cb1f..00000000000 --- a/core/services/keystore/cosmos_test.go +++ /dev/null @@ -1,113 +0,0 @@ -package keystore_test - -import ( - "context" - "testing" - - "github.com/stretchr/testify/require" - - "github.com/smartcontractkit/chainlink-common/keystore/corekeys" - "github.com/smartcontractkit/chainlink-common/keystore/corekeys/cosmoskey" - "github.com/smartcontractkit/chainlink-common/pkg/utils" - "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" - "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore" -) - -func Test_CosmosKeyStore_E2E(t *testing.T) { - db := pgtest.NewSqlxDB(t) - - keyStore := keystore.ExposedNewMaster(t, db) - require.NoError(t, keyStore.Unlock(t.Context(), cltest.Password)) - ks := keyStore.Cosmos() - reset := func() { - ctx := context.Background() // Executed during cleanup - require.NoError(t, utils.JustError(db.Exec("DELETE FROM encrypted_key_rings"))) - keyStore.ResetXXXTestOnly() - require.NoError(t, keyStore.Unlock(ctx, cltest.Password)) - } - - t.Run("initializes with an empty state", func(t *testing.T) { - defer reset() - keys, err := ks.GetAll() - require.NoError(t, err) - require.Empty(t, keys) - }) - - t.Run("errors when getting non-existent ID", func(t *testing.T) { - defer reset() - _, err := ks.Get("non-existent-id") - require.Error(t, err) - }) - - t.Run("creates a key", func(t *testing.T) { - defer reset() - ctx := t.Context() - key, err := ks.Create(ctx) - require.NoError(t, err) - retrievedKey, err := ks.Get(key.ID()) - require.NoError(t, err) - corekeys.RequireEqualKeys(t, key, retrievedKey) - }) - - t.Run("imports and exports a key", func(t *testing.T) { - defer reset() - ctx := t.Context() - key, err := ks.Create(ctx) - require.NoError(t, err) - exportJSON, err := ks.Export(key.ID(), cltest.Password) - require.NoError(t, err) - _, err = ks.Export("non-existent", cltest.Password) - require.Error(t, err) - _, err = ks.Delete(ctx, key.ID()) - require.NoError(t, err) - _, err = ks.Get(key.ID()) - require.Error(t, err) - importedKey, err := ks.Import(ctx, exportJSON, cltest.Password) - require.NoError(t, err) - _, err = ks.Import(ctx, exportJSON, cltest.Password) - require.Error(t, err) - _, err = ks.Import(ctx, []byte(""), cltest.Password) - require.Error(t, err) - require.Equal(t, key.ID(), importedKey.ID()) - retrievedKey, err := ks.Get(key.ID()) - require.NoError(t, err) - corekeys.RequireEqualKeys(t, importedKey, retrievedKey) - }) - - t.Run("adds an externally created key / deletes a key", func(t *testing.T) { - defer reset() - ctx := t.Context() - newKey := cosmoskey.New() - err := ks.Add(ctx, newKey) - require.NoError(t, err) - err = ks.Add(ctx, newKey) - require.Error(t, err) - keys, err := ks.GetAll() - require.NoError(t, err) - require.Len(t, keys, 1) - _, err = ks.Delete(ctx, newKey.ID()) - require.NoError(t, err) - _, err = ks.Delete(ctx, newKey.ID()) - require.Error(t, err) - keys, err = ks.GetAll() - require.NoError(t, err) - require.Empty(t, keys) - _, err = ks.Get(newKey.ID()) - require.Error(t, err) - }) - - t.Run("ensures key", func(t *testing.T) { - defer reset() - ctx := t.Context() - err := ks.EnsureKey(ctx) - require.NoError(t, err) - - err = ks.EnsureKey(ctx) - require.NoError(t, err) - - keys, err := ks.GetAll() - require.NoError(t, err) - require.Len(t, keys, 1) - }) -} diff --git a/core/services/keystore/keystoretest.go b/core/services/keystore/keystoretest.go index 7c01f0f02f4..f22d748069e 100644 --- a/core/services/keystore/keystoretest.go +++ b/core/services/keystore/keystoretest.go @@ -65,7 +65,6 @@ func NewInMemory(ds sqlutil.DataSource, scryptParams keystore.ScryptParams, logf return &master{ keyManager: km, - cosmos: newCosmosKeyStore(km), csa: newCSAKeyStore(km), eth: newEthKeyStore(km, dbORM, ds), ocr: newOCRKeyStore(km), diff --git a/core/services/keystore/master.go b/core/services/keystore/master.go index 606879a1d8d..5b002018a1f 100644 --- a/core/services/keystore/master.go +++ b/core/services/keystore/master.go @@ -12,7 +12,6 @@ import ( "github.com/smartcontractkit/chainlink-common/keystore" "github.com/smartcontractkit/chainlink-common/keystore/corekeys" "github.com/smartcontractkit/chainlink-common/keystore/corekeys/aptoskey" - "github.com/smartcontractkit/chainlink-common/keystore/corekeys/cosmoskey" "github.com/smartcontractkit/chainlink-common/keystore/corekeys/csakey" "github.com/smartcontractkit/chainlink-common/keystore/corekeys/dkgrecipientkey" "github.com/smartcontractkit/chainlink-common/keystore/corekeys/ethkey" @@ -48,7 +47,6 @@ type Master interface { OCR2() OCR2 P2P() P2P Solana() Solana - Cosmos() Cosmos StarkNet() StarkNet Aptos() Aptos Stellar() Stellar @@ -63,7 +61,6 @@ type Master interface { } type master struct { *keyManager - cosmos *cosmos csa *csa eth *eth ocr *ocr @@ -99,7 +96,6 @@ func newMaster(ds sqlutil.DataSource, scryptParams keystore.ScryptParams, announ return &master{ keyManager: km, - cosmos: newCosmosKeyStore(km), csa: newCSAKeyStore(km), eth: newEthKeyStore(km, orm, orm.ds), ocr: newOCRKeyStore(km), @@ -142,10 +138,6 @@ func (ks *master) Solana() Solana { return ks.solana } -func (ks *master) Cosmos() Cosmos { - return ks.cosmos -} - func (ks *master) StarkNet() StarkNet { return ks.starknet } @@ -296,8 +288,6 @@ func (km *keyManager) isLocked() bool { func GetFieldNameForKey(unknownKey Key) (string, error) { switch unknownKey.(type) { - case cosmoskey.Key: - return "Cosmos", nil case csakey.KeyV2: return "CSA", nil case ethkey.KeyV2: diff --git a/core/services/keystore/mocks/cosmos.go b/core/services/keystore/mocks/cosmos.go deleted file mode 100644 index 29a7c2d1f15..00000000000 --- a/core/services/keystore/mocks/cosmos.go +++ /dev/null @@ -1,474 +0,0 @@ -// Code generated by mockery v2.53.6. DO NOT EDIT. - -package mocks - -import ( - context "context" - - cosmoskey "github.com/smartcontractkit/chainlink-common/keystore/corekeys/cosmoskey" - - mock "github.com/stretchr/testify/mock" -) - -// Cosmos is an autogenerated mock type for the Cosmos type -type Cosmos struct { - mock.Mock -} - -type Cosmos_Expecter struct { - mock *mock.Mock -} - -func (_m *Cosmos) EXPECT() *Cosmos_Expecter { - return &Cosmos_Expecter{mock: &_m.Mock} -} - -// Add provides a mock function with given fields: ctx, key -func (_m *Cosmos) Add(ctx context.Context, key cosmoskey.Key) error { - ret := _m.Called(ctx, key) - - if len(ret) == 0 { - panic("no return value specified for Add") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context, cosmoskey.Key) error); ok { - r0 = rf(ctx, key) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// Cosmos_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add' -type Cosmos_Add_Call struct { - *mock.Call -} - -// Add is a helper method to define mock.On call -// - ctx context.Context -// - key cosmoskey.Key -func (_e *Cosmos_Expecter) Add(ctx interface{}, key interface{}) *Cosmos_Add_Call { - return &Cosmos_Add_Call{Call: _e.mock.On("Add", ctx, key)} -} - -func (_c *Cosmos_Add_Call) Run(run func(ctx context.Context, key cosmoskey.Key)) *Cosmos_Add_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(cosmoskey.Key)) - }) - return _c -} - -func (_c *Cosmos_Add_Call) Return(_a0 error) *Cosmos_Add_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Cosmos_Add_Call) RunAndReturn(run func(context.Context, cosmoskey.Key) error) *Cosmos_Add_Call { - _c.Call.Return(run) - return _c -} - -// Create provides a mock function with given fields: ctx -func (_m *Cosmos) Create(ctx context.Context) (cosmoskey.Key, error) { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for Create") - } - - var r0 cosmoskey.Key - var r1 error - if rf, ok := ret.Get(0).(func(context.Context) (cosmoskey.Key, error)); ok { - return rf(ctx) - } - if rf, ok := ret.Get(0).(func(context.Context) cosmoskey.Key); ok { - r0 = rf(ctx) - } else { - r0 = ret.Get(0).(cosmoskey.Key) - } - - if rf, ok := ret.Get(1).(func(context.Context) error); ok { - r1 = rf(ctx) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Cosmos_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' -type Cosmos_Create_Call struct { - *mock.Call -} - -// Create is a helper method to define mock.On call -// - ctx context.Context -func (_e *Cosmos_Expecter) Create(ctx interface{}) *Cosmos_Create_Call { - return &Cosmos_Create_Call{Call: _e.mock.On("Create", ctx)} -} - -func (_c *Cosmos_Create_Call) Run(run func(ctx context.Context)) *Cosmos_Create_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *Cosmos_Create_Call) Return(_a0 cosmoskey.Key, _a1 error) *Cosmos_Create_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Cosmos_Create_Call) RunAndReturn(run func(context.Context) (cosmoskey.Key, error)) *Cosmos_Create_Call { - _c.Call.Return(run) - return _c -} - -// Delete provides a mock function with given fields: ctx, id -func (_m *Cosmos) Delete(ctx context.Context, id string) (cosmoskey.Key, error) { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for Delete") - } - - var r0 cosmoskey.Key - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string) (cosmoskey.Key, error)); ok { - return rf(ctx, id) - } - if rf, ok := ret.Get(0).(func(context.Context, string) cosmoskey.Key); ok { - r0 = rf(ctx, id) - } else { - r0 = ret.Get(0).(cosmoskey.Key) - } - - if rf, ok := ret.Get(1).(func(context.Context, string) error); ok { - r1 = rf(ctx, id) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Cosmos_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' -type Cosmos_Delete_Call struct { - *mock.Call -} - -// Delete is a helper method to define mock.On call -// - ctx context.Context -// - id string -func (_e *Cosmos_Expecter) Delete(ctx interface{}, id interface{}) *Cosmos_Delete_Call { - return &Cosmos_Delete_Call{Call: _e.mock.On("Delete", ctx, id)} -} - -func (_c *Cosmos_Delete_Call) Run(run func(ctx context.Context, id string)) *Cosmos_Delete_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].(string)) - }) - return _c -} - -func (_c *Cosmos_Delete_Call) Return(_a0 cosmoskey.Key, _a1 error) *Cosmos_Delete_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Cosmos_Delete_Call) RunAndReturn(run func(context.Context, string) (cosmoskey.Key, error)) *Cosmos_Delete_Call { - _c.Call.Return(run) - return _c -} - -// EnsureKey provides a mock function with given fields: ctx -func (_m *Cosmos) EnsureKey(ctx context.Context) error { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for EnsureKey") - } - - var r0 error - if rf, ok := ret.Get(0).(func(context.Context) error); ok { - r0 = rf(ctx) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// Cosmos_EnsureKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EnsureKey' -type Cosmos_EnsureKey_Call struct { - *mock.Call -} - -// EnsureKey is a helper method to define mock.On call -// - ctx context.Context -func (_e *Cosmos_Expecter) EnsureKey(ctx interface{}) *Cosmos_EnsureKey_Call { - return &Cosmos_EnsureKey_Call{Call: _e.mock.On("EnsureKey", ctx)} -} - -func (_c *Cosmos_EnsureKey_Call) Run(run func(ctx context.Context)) *Cosmos_EnsureKey_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context)) - }) - return _c -} - -func (_c *Cosmos_EnsureKey_Call) Return(_a0 error) *Cosmos_EnsureKey_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Cosmos_EnsureKey_Call) RunAndReturn(run func(context.Context) error) *Cosmos_EnsureKey_Call { - _c.Call.Return(run) - return _c -} - -// Export provides a mock function with given fields: id, password -func (_m *Cosmos) Export(id string, password string) ([]byte, error) { - ret := _m.Called(id, password) - - if len(ret) == 0 { - panic("no return value specified for Export") - } - - var r0 []byte - var r1 error - if rf, ok := ret.Get(0).(func(string, string) ([]byte, error)); ok { - return rf(id, password) - } - if rf, ok := ret.Get(0).(func(string, string) []byte); ok { - r0 = rf(id, password) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - if rf, ok := ret.Get(1).(func(string, string) error); ok { - r1 = rf(id, password) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Cosmos_Export_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Export' -type Cosmos_Export_Call struct { - *mock.Call -} - -// Export is a helper method to define mock.On call -// - id string -// - password string -func (_e *Cosmos_Expecter) Export(id interface{}, password interface{}) *Cosmos_Export_Call { - return &Cosmos_Export_Call{Call: _e.mock.On("Export", id, password)} -} - -func (_c *Cosmos_Export_Call) Run(run func(id string, password string)) *Cosmos_Export_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string), args[1].(string)) - }) - return _c -} - -func (_c *Cosmos_Export_Call) Return(_a0 []byte, _a1 error) *Cosmos_Export_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Cosmos_Export_Call) RunAndReturn(run func(string, string) ([]byte, error)) *Cosmos_Export_Call { - _c.Call.Return(run) - return _c -} - -// Get provides a mock function with given fields: id -func (_m *Cosmos) Get(id string) (cosmoskey.Key, error) { - ret := _m.Called(id) - - if len(ret) == 0 { - panic("no return value specified for Get") - } - - var r0 cosmoskey.Key - var r1 error - if rf, ok := ret.Get(0).(func(string) (cosmoskey.Key, error)); ok { - return rf(id) - } - if rf, ok := ret.Get(0).(func(string) cosmoskey.Key); ok { - r0 = rf(id) - } else { - r0 = ret.Get(0).(cosmoskey.Key) - } - - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(id) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Cosmos_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' -type Cosmos_Get_Call struct { - *mock.Call -} - -// Get is a helper method to define mock.On call -// - id string -func (_e *Cosmos_Expecter) Get(id interface{}) *Cosmos_Get_Call { - return &Cosmos_Get_Call{Call: _e.mock.On("Get", id)} -} - -func (_c *Cosmos_Get_Call) Run(run func(id string)) *Cosmos_Get_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(string)) - }) - return _c -} - -func (_c *Cosmos_Get_Call) Return(_a0 cosmoskey.Key, _a1 error) *Cosmos_Get_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Cosmos_Get_Call) RunAndReturn(run func(string) (cosmoskey.Key, error)) *Cosmos_Get_Call { - _c.Call.Return(run) - return _c -} - -// GetAll provides a mock function with no fields -func (_m *Cosmos) GetAll() ([]cosmoskey.Key, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetAll") - } - - var r0 []cosmoskey.Key - var r1 error - if rf, ok := ret.Get(0).(func() ([]cosmoskey.Key, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() []cosmoskey.Key); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]cosmoskey.Key) - } - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Cosmos_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll' -type Cosmos_GetAll_Call struct { - *mock.Call -} - -// GetAll is a helper method to define mock.On call -func (_e *Cosmos_Expecter) GetAll() *Cosmos_GetAll_Call { - return &Cosmos_GetAll_Call{Call: _e.mock.On("GetAll")} -} - -func (_c *Cosmos_GetAll_Call) Run(run func()) *Cosmos_GetAll_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Cosmos_GetAll_Call) Return(_a0 []cosmoskey.Key, _a1 error) *Cosmos_GetAll_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Cosmos_GetAll_Call) RunAndReturn(run func() ([]cosmoskey.Key, error)) *Cosmos_GetAll_Call { - _c.Call.Return(run) - return _c -} - -// Import provides a mock function with given fields: ctx, keyJSON, password -func (_m *Cosmos) Import(ctx context.Context, keyJSON []byte, password string) (cosmoskey.Key, error) { - ret := _m.Called(ctx, keyJSON, password) - - if len(ret) == 0 { - panic("no return value specified for Import") - } - - var r0 cosmoskey.Key - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, []byte, string) (cosmoskey.Key, error)); ok { - return rf(ctx, keyJSON, password) - } - if rf, ok := ret.Get(0).(func(context.Context, []byte, string) cosmoskey.Key); ok { - r0 = rf(ctx, keyJSON, password) - } else { - r0 = ret.Get(0).(cosmoskey.Key) - } - - if rf, ok := ret.Get(1).(func(context.Context, []byte, string) error); ok { - r1 = rf(ctx, keyJSON, password) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Cosmos_Import_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Import' -type Cosmos_Import_Call struct { - *mock.Call -} - -// Import is a helper method to define mock.On call -// - ctx context.Context -// - keyJSON []byte -// - password string -func (_e *Cosmos_Expecter) Import(ctx interface{}, keyJSON interface{}, password interface{}) *Cosmos_Import_Call { - return &Cosmos_Import_Call{Call: _e.mock.On("Import", ctx, keyJSON, password)} -} - -func (_c *Cosmos_Import_Call) Run(run func(ctx context.Context, keyJSON []byte, password string)) *Cosmos_Import_Call { - _c.Call.Run(func(args mock.Arguments) { - run(args[0].(context.Context), args[1].([]byte), args[2].(string)) - }) - return _c -} - -func (_c *Cosmos_Import_Call) Return(_a0 cosmoskey.Key, _a1 error) *Cosmos_Import_Call { - _c.Call.Return(_a0, _a1) - return _c -} - -func (_c *Cosmos_Import_Call) RunAndReturn(run func(context.Context, []byte, string) (cosmoskey.Key, error)) *Cosmos_Import_Call { - _c.Call.Return(run) - return _c -} - -// NewCosmos creates a new instance of Cosmos. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewCosmos(t interface { - mock.TestingT - Cleanup(func()) -}) *Cosmos { - mock := &Cosmos{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/core/services/keystore/mocks/master.go b/core/services/keystore/mocks/master.go index aae91eda5fb..0a2b7ced325 100644 --- a/core/services/keystore/mocks/master.go +++ b/core/services/keystore/mocks/master.go @@ -116,53 +116,6 @@ func (_c *Master_CSA_Call) RunAndReturn(run func() keystore.CSA) *Master_CSA_Cal return _c } -// Cosmos provides a mock function with no fields -func (_m *Master) Cosmos() keystore.Cosmos { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Cosmos") - } - - var r0 keystore.Cosmos - if rf, ok := ret.Get(0).(func() keystore.Cosmos); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(keystore.Cosmos) - } - } - - return r0 -} - -// Master_Cosmos_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Cosmos' -type Master_Cosmos_Call struct { - *mock.Call -} - -// Cosmos is a helper method to define mock.On call -func (_e *Master_Expecter) Cosmos() *Master_Cosmos_Call { - return &Master_Cosmos_Call{Call: _e.mock.On("Cosmos")} -} - -func (_c *Master_Cosmos_Call) Run(run func()) *Master_Cosmos_Call { - _c.Call.Run(func(args mock.Arguments) { - run() - }) - return _c -} - -func (_c *Master_Cosmos_Call) Return(_a0 keystore.Cosmos) *Master_Cosmos_Call { - _c.Call.Return(_a0) - return _c -} - -func (_c *Master_Cosmos_Call) RunAndReturn(run func() keystore.Cosmos) *Master_Cosmos_Call { - _c.Call.Return(run) - return _c -} - // DKGRecipient provides a mock function with no fields func (_m *Master) DKGRecipient() keystore.DKGRecipient { ret := _m.Called() diff --git a/core/services/keystore/ocr2_test.go b/core/services/keystore/ocr2_test.go index 28c0ea78148..6621a210bb8 100644 --- a/core/services/keystore/ocr2_test.go +++ b/core/services/keystore/ocr2_test.go @@ -180,11 +180,6 @@ func Test_OCR2KeyStore_E2E(t *testing.T) { require.NoError(t, err) require.Len(t, keys, 2) - cosmosKeys, err := ks.GetAllOfType(corekeys.Cosmos) - require.NoError(t, err) - require.Len(t, cosmosKeys, 1) - require.Equal(t, corekeys.Cosmos, cosmosKeys[0].ChainType()) - err = ks.EnsureKeys(ctx, corekeys.StarkNet) require.NoError(t, err) diff --git a/core/services/relay/relay.go b/core/services/relay/relay.go index bbee6415d93..fecd143122b 100644 --- a/core/services/relay/relay.go +++ b/core/services/relay/relay.go @@ -10,7 +10,6 @@ import ( const ( NetworkEVM = "evm" - NetworkCosmos = "cosmos" NetworkSolana = "solana" NetworkStarkNet = "starknet" NetworkAptos = "aptos" @@ -24,7 +23,6 @@ const ( var SupportedNetworks = map[string]struct{}{ NetworkEVM: {}, - NetworkCosmos: {}, NetworkSolana: {}, NetworkStarkNet: {}, NetworkAptos: {}, diff --git a/core/store/models/cosmos/common.go b/core/store/models/cosmos/common.go deleted file mode 100644 index 1c653e3ad40..00000000000 --- a/core/store/models/cosmos/common.go +++ /dev/null @@ -1,15 +0,0 @@ -package cosmos - -import ( - "math/big" -) - -// SendRequest represents a request to transfer Cosmos coins. -type SendRequest struct { - DestinationAddress string `json:"address"` - FromAddress string `json:"from"` - Amount *big.Int `json:"amount"` - CosmosChainID string `json:"cosmosChainID"` - Token string `json:"token"` - AllowHigherAmounts bool `json:"allowHigherAmounts"` -} diff --git a/core/web/auth/auth_test.go b/core/web/auth/auth_test.go index c70dbe778e3..ccc574a92aa 100644 --- a/core/web/auth/auth_test.go +++ b/core/web/auth/auth_test.go @@ -231,7 +231,6 @@ var routesRolesMap = [...]routeRules{ {"DELETE", "/v2/bridge_types/MOCK", false, false, true}, {"POST", "/v2/transfers", false, false, false}, {"POST", "/v2/transfers/evm", false, false, false}, - {"POST", "/v2/transfers/cosmos", false, false, false}, {"POST", "/v2/transfers/solana", false, false, false}, {"GET", "/v2/config", true, true, true}, {"GET", "/v2/config/v2", true, true, true}, @@ -267,35 +266,30 @@ var routesRolesMap = [...]routeRules{ {"POST", "/v2/keys/p2p/import", false, false, false}, {"POST", "/v2/keys/p2p/export/MOCK", false, false, false}, {"GET", "/v2/keys/solana", true, true, true}, - {"GET", "/v2/keys/cosmos", true, true, true}, {"GET", "/v2/keys/starknet", true, true, true}, {"GET", "/v2/keys/aptos", true, true, true}, {"GET", "/v2/keys/stellar", true, true, true}, {"GET", "/v2/keys/tron", true, true, true}, {"GET", "/v2/keys/ton", true, true, true}, {"POST", "/v2/keys/solana", false, false, true}, - {"POST", "/v2/keys/cosmos", false, false, true}, {"POST", "/v2/keys/starknet", false, false, true}, {"POST", "/v2/keys/aptos", false, false, true}, {"POST", "/v2/keys/stellar", false, false, true}, {"POST", "/v2/keys/tron", false, false, true}, {"POST", "/v2/keys/ton", false, false, true}, {"DELETE", "/v2/keys/solana/MOCK", false, false, false}, - {"DELETE", "/v2/keys/cosmos/MOCK", false, false, false}, {"DELETE", "/v2/keys/starknet/MOCK", false, false, false}, {"DELETE", "/v2/keys/aptos/MOCK", false, false, false}, {"DELETE", "/v2/keys/stellar/MOCK", false, false, false}, {"DELETE", "/v2/keys/tron/MOCK", false, false, false}, {"DELETE", "/v2/keys/ton/MOCK", false, false, false}, {"POST", "/v2/keys/solana/import", false, false, false}, - {"POST", "/v2/keys/cosmos/import", false, false, false}, {"POST", "/v2/keys/starknet/import", false, false, false}, {"POST", "/v2/keys/aptos/import", false, false, false}, {"POST", "/v2/keys/stellar/import", false, false, false}, {"POST", "/v2/keys/tron/import", false, false, false}, {"POST", "/v2/keys/ton/import", false, false, false}, {"POST", "/v2/keys/solana/export/MOCK", false, false, false}, - {"POST", "/v2/keys/cosmos/export/MOCK", false, false, false}, {"POST", "/v2/keys/starknet/export/MOCK", false, false, false}, {"POST", "/v2/keys/aptos/export/MOCK", false, false, false}, {"POST", "/v2/keys/stellar/export/MOCK", false, false, false}, @@ -320,18 +314,14 @@ var routesRolesMap = [...]routeRules{ {"GET", "/v2/chains/evm", true, true, true}, {"GET", "/v2/chains/solana", true, true, true}, {"GET", "/v2/chains/stellar", true, true, true}, - {"GET", "/v2/chains/cosmos", true, true, true}, {"GET", "/v2/chains/evm/MOCK", true, true, true}, - {"GET", "/v2/chains/cosmos/MOCK", true, true, true}, {"GET", "/v2/nodes/", true, true, true}, {"GET", "/v2/nodes/evm", true, true, true}, {"GET", "/v2/nodes/solana", true, true, true}, {"GET", "/v2/nodes/stellar", true, true, true}, - {"GET", "/v2/nodes/cosmos", true, true, true}, {"GET", "/v2/chains/evm/MOCK/nodes", true, true, true}, {"GET", "/v2/chains/solana/MOCK/nodes", true, true, true}, {"GET", "/v2/chains/stellar/MOCK/nodes", true, true, true}, - {"GET", "/v2/chains/cosmos/MOCK/nodes", true, true, true}, {"GET", "/v2/nodes/evm/forwarders", true, true, true}, {"POST", "/v2/nodes/evm/forwarders/track", false, false, true}, {"DELETE", "/v2/nodes/evm/forwarders/MOCK", false, false, true}, diff --git a/core/web/chains_controller_integration_test.go b/core/web/chains_controller_integration_test.go index 4231fd0e959..85ad679358a 100644 --- a/core/web/chains_controller_integration_test.go +++ b/core/web/chains_controller_integration_test.go @@ -3,220 +3,23 @@ package web_test import ( - "cmp" "fmt" "math/rand/v2" "net/http" "testing" "github.com/manyminds/api2go/jsonapi" - "github.com/shopspring/decimal" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" commonTypes "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/configtest" - "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/cosmostest" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" "github.com/smartcontractkit/chainlink/v2/core/web" "github.com/smartcontractkit/chainlink/v2/core/web/presenters" ) -func Test_CosmosChainsController_Show(t *testing.T) { - t.Skip("cosmos has been deprecated") - t.Parallel() - - const validID = "Chainlink-12" - - testCases := []struct { - name string - inputID string - wantStatusCode int - want func(t *testing.T, app *cltest.TestApplication) *commonTypes.ChainStatus - }{ - { - inputID: validID, - name: "success", - want: func(t *testing.T, app *cltest.TestApplication) *commonTypes.ChainStatus { - return &commonTypes.ChainStatus{ - ID: validID, - Enabled: true, - Config: `ChainID = 'Chainlink-12' -Bech32Prefix = 'wasm' -BlockRate = '6s' -BlocksUntilTxTimeout = 30 -ConfirmPollPeriod = '1s' -FallbackGasPrice = '9.999' -GasToken = 'ucosm' -GasLimitMultiplier = '1.55555' -MaxMsgsPerBatch = 100 -OCR2CachePollPeriod = '4s' -OCR2CacheTTL = '1m0s' -TxMsgTimeout = '10m0s' - -[[Nodes]] -Name = 'primary' -TendermintURL = 'http://tender.mint' -`, - } - }, - wantStatusCode: http.StatusOK, - }, - { - inputID: "234", - name: "not found", - want: func(t *testing.T, app *cltest.TestApplication) *commonTypes.ChainStatus { - return nil - }, - wantStatusCode: http.StatusBadRequest, - }, - } - - for _, testCase := range testCases { - tc := testCase - - t.Run(tc.name, func(t *testing.T) { - t.Parallel() - - controller := setupCosmosChainsControllerTestV2(t, chainlink.RawConfig{ - "ChainID": validID, - "FallbackGasPrice": new(decimal.RequireFromString("9.999")), - "GasLimitMultiplier": new(decimal.RequireFromString("1.55555")), - "Nodes": []map[string]any{{ - "Name": "primary", - "TendermintURL": "http://tender.mint", - }}, - }) - - wantedResult := tc.want(t, controller.app) - resp, cleanup := controller.client.Get( - "/v2/chains/cosmos/" + tc.inputID, - ) - t.Cleanup(cleanup) - require.Equal(t, tc.wantStatusCode, resp.StatusCode) - - if wantedResult != nil { - resource1 := presenters.ChainResource{} - err := web.ParseJSONAPIResponse(cltest.ParseResponseBody(t, resp), &resource1) - require.NoError(t, err) - - assert.Equal(t, wantedResult.ID, resource1.ID) - assert.Equal(t, wantedResult.Config, resource1.Config) - } - }) - } -} - -func configForChain(rc chainlink.RawConfig) string { - gasPrice := cmp.Or(rc["FallbackGasPrice"], "0.015") - gasLimitMult := cmp.Or(rc["GasLimitMultiplier"], "1.5") - - return fmt.Sprintf(`ChainID = '%s' -Bech32Prefix = 'wasm' -BlockRate = '6s' -BlocksUntilTxTimeout = 30 -ConfirmPollPeriod = '1s' -FallbackGasPrice = '%s' -GasToken = 'ucosm' -GasLimitMultiplier = '%s' -MaxMsgsPerBatch = 100 -OCR2CachePollPeriod = '4s' -OCR2CacheTTL = '1m0s' -TxMsgTimeout = '10m0s' - -[[Nodes]] -Name = 'primary' -TendermintURL = 'http://tender.mint' -`, rc.ChainID(), gasPrice, gasLimitMult) -} - -func Test_CosmosChainsController_Index(t *testing.T) { - t.Skip("cosmos has been deprecated") - t.Parallel() - - chainA := chainlink.RawConfig{ - "ChainID": "a" + cosmostest.RandomChainID(), - "FallbackGasPrice": new(decimal.RequireFromString("9.999")), - "Nodes": []map[string]any{{ - "Name": "primary", - "TendermintURL": "http://tender.mint", - }}, - } - - chainB := chainlink.RawConfig{ - "ChainID": "b" + cosmostest.RandomChainID(), - "GasLimitMultiplier": new(decimal.RequireFromString("1.55555")), - "Nodes": []map[string]any{{ - "Name": "primary", - "TendermintURL": "http://tender.mint", - }}, - } - controller := setupCosmosChainsControllerTestV2(t, chainA, chainB) - - badResp, cleanup := controller.client.Get("/v2/chains/cosmos?size=asd") - t.Cleanup(cleanup) - require.Equal(t, http.StatusUnprocessableEntity, badResp.StatusCode) - - resp, cleanup := controller.client.Get("/v2/chains/cosmos?size=1") - t.Cleanup(cleanup) - require.Equal(t, http.StatusOK, resp.StatusCode) - - body := cltest.ParseResponseBody(t, resp) - - metaCount, err := cltest.ParseJSONAPIResponseMetaCount(body) - require.NoError(t, err) - require.Equal(t, 2, metaCount) - - var links jsonapi.Links - - var chains []presenters.ChainResource - err = web.ParsePaginatedResponse(body, &chains, &links) - require.NoError(t, err) - assert.NotEmpty(t, links["next"].Href) - assert.Empty(t, links["prev"].Href) - - assert.Len(t, links, 1) - assert.Equal(t, chainA.ChainID(), chains[0].ID) - assert.Equal(t, configForChain(chainA), chains[0].Config) - - resp, cleanup = controller.client.Get(links["next"].Href) - t.Cleanup(cleanup) - require.Equal(t, http.StatusOK, resp.StatusCode) - - chains = []presenters.ChainResource{} - err = web.ParsePaginatedResponse(cltest.ParseResponseBody(t, resp), &chains, &links) - require.NoError(t, err) - assert.Empty(t, links["next"].Href) - assert.NotEmpty(t, links["prev"].Href) - - assert.Len(t, links, 1) - assert.Equal(t, chainB.ChainID(), chains[0].ID) - assert.Equal(t, configForChain(chainB), chains[0].Config) -} - -type TestCosmosChainsController struct { - app *cltest.TestApplication - client cltest.HTTPClientCleaner -} - -func setupCosmosChainsControllerTestV2(t *testing.T, cfgs ...chainlink.RawConfig) *TestCosmosChainsController { - cfg := configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) { - c.Cosmos = cfgs - c.EVM = nil - }) - app := cltest.NewApplicationWithConfig(t, cfg) - ctx := t.Context() - require.NoError(t, app.Start(ctx)) - - client := app.NewHTTPClient(nil) - - return &TestCosmosChainsController{ - app: app, - client: client, - } -} - func Test_SolanaChainsController_Show(t *testing.T) { t.Parallel() diff --git a/core/web/cosmos_keys_controller.go b/core/web/cosmos_keys_controller.go deleted file mode 100644 index 83f6a48e6ba..00000000000 --- a/core/web/cosmos_keys_controller.go +++ /dev/null @@ -1,12 +0,0 @@ -package web - -import ( - "github.com/smartcontractkit/chainlink-common/keystore/corekeys/cosmoskey" - "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" - "github.com/smartcontractkit/chainlink/v2/core/web/presenters" -) - -func NewCosmosKeysController(app chainlink.Application) KeysController { - return NewKeysController[cosmoskey.Key, presenters.CosmosKeyResource](app.GetKeyStore().Cosmos(), app.GetLogger(), app.GetAuditLogger(), - "cosmosKey", presenters.NewCosmosKeyResource, presenters.NewCosmosKeyResources) -} diff --git a/core/web/cosmos_keys_controller_test.go b/core/web/cosmos_keys_controller_test.go deleted file mode 100644 index be005e6e30d..00000000000 --- a/core/web/cosmos_keys_controller_test.go +++ /dev/null @@ -1,109 +0,0 @@ -package web_test - -import ( - "net/http" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - "github.com/smartcontractkit/chainlink-common/pkg/utils" - "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" - "github.com/smartcontractkit/chainlink/v2/core/services/keystore" - "github.com/smartcontractkit/chainlink/v2/core/web" - "github.com/smartcontractkit/chainlink/v2/core/web/presenters" -) - -func TestCosmosKeysController_Index_HappyPath(t *testing.T) { - t.Skip("cosmos has been deprecated") - t.Parallel() - - client, keyStore := setupCosmosKeysControllerTests(t) - keys, _ := keyStore.Cosmos().GetAll() - - response, cleanup := client.Get("/v2/keys/cosmos") - t.Cleanup(cleanup) - cltest.AssertServerResponse(t, response, http.StatusOK) - - resources := []presenters.CosmosKeyResource{} - err := web.ParseJSONAPIResponse(cltest.ParseResponseBody(t, response), &resources) - require.NoError(t, err) - - require.Len(t, resources, len(keys)) - - assert.Equal(t, keys[0].ID(), resources[0].ID) - assert.Equal(t, keys[0].PublicKeyStr(), resources[0].PubKey) -} - -func TestCosmosKeysController_Create_HappyPath(t *testing.T) { - t.Skip("cosmos has been deprecated") - t.Parallel() - - app := cltest.NewApplicationEVMDisabled(t) - ctx := t.Context() - require.NoError(t, app.Start(ctx)) - client := app.NewHTTPClient(nil) - keyStore := app.GetKeyStore() - - response, cleanup := client.Post("/v2/keys/cosmos", nil) - t.Cleanup(cleanup) - cltest.AssertServerResponse(t, response, http.StatusOK) - - keys, _ := keyStore.Cosmos().GetAll() - require.Len(t, keys, 1) - - resource := presenters.CosmosKeyResource{} - err := web.ParseJSONAPIResponse(cltest.ParseResponseBody(t, response), &resource) - require.NoError(t, err) - - assert.Equal(t, keys[0].ID(), resource.ID) - assert.Equal(t, keys[0].PublicKeyStr(), resource.PubKey) - - _, err = keyStore.Cosmos().Get(resource.ID) - require.NoError(t, err) -} - -func TestCosmosKeysController_Delete_NonExistentCosmosKeyID(t *testing.T) { - t.Skip("cosmos has been deprecated") - t.Parallel() - - client, _ := setupCosmosKeysControllerTests(t) - - nonExistentCosmosKeyID := "foobar" - response, cleanup := client.Delete("/v2/keys/cosmos/" + nonExistentCosmosKeyID) - t.Cleanup(cleanup) - assert.Equal(t, http.StatusNotFound, response.StatusCode) -} - -func TestCosmosKeysController_Delete_HappyPath(t *testing.T) { - t.Skip("cosmos has been deprecated") - t.Parallel() - ctx := t.Context() - - client, keyStore := setupCosmosKeysControllerTests(t) - - keys, _ := keyStore.Cosmos().GetAll() - initialLength := len(keys) - key, _ := keyStore.Cosmos().Create(ctx) - - response, cleanup := client.Delete("/v2/keys/cosmos/" + key.ID()) - t.Cleanup(cleanup) - assert.Equal(t, http.StatusOK, response.StatusCode) - require.Error(t, utils.JustError(keyStore.Cosmos().Get(key.ID()))) - - keys, _ = keyStore.Cosmos().GetAll() - assert.Len(t, keys, initialLength) -} - -func setupCosmosKeysControllerTests(t *testing.T) (cltest.HTTPClientCleaner, keystore.Master) { - t.Helper() - ctx := t.Context() - - app := cltest.NewApplication(t) - require.NoError(t, app.Start(ctx)) - require.NoError(t, app.KeyStore.Cosmos().Add(ctx, cltest.DefaultCosmosKey)) - - client := app.NewHTTPClient(nil) - - return client, app.GetKeyStore() -} diff --git a/core/web/cosmos_transfer_controller.go b/core/web/cosmos_transfer_controller.go deleted file mode 100644 index b97ab42fc19..00000000000 --- a/core/web/cosmos_transfer_controller.go +++ /dev/null @@ -1,93 +0,0 @@ -package web - -import ( - "fmt" - "net/http" - "slices" - - "github.com/gin-gonic/gin" - "github.com/google/uuid" - "github.com/pkg/errors" - - "github.com/smartcontractkit/chainlink-common/pkg/types" - "github.com/smartcontractkit/chainlink/v2/core/logger/audit" - "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" - "github.com/smartcontractkit/chainlink/v2/core/services/relay" - cosmosmodels "github.com/smartcontractkit/chainlink/v2/core/store/models/cosmos" - "github.com/smartcontractkit/chainlink/v2/core/web/presenters" -) - -// CosmosTransfersController can send LINK tokens to another address -type CosmosTransfersController struct { - App chainlink.Application -} - -var ErrCosmosNotEnabled = chainDisabledError{name: "Cosmos", tomlKey: "Cosmos.Enabled"} - -// Create sends native coins from the Chainlink's account to a specified address. -func (tc *CosmosTransfersController) Create(c *gin.Context) { - relayers := tc.App.GetRelayers().List(chainlink.FilterRelayersByType(relay.NetworkCosmos)) - if relayers == nil { - jsonAPIError(c, http.StatusBadRequest, ErrCosmosNotEnabled) - return - } - - var tr cosmosmodels.SendRequest - if err := c.ShouldBindJSON(&tr); err != nil { - jsonAPIError(c, http.StatusBadRequest, err) - return - } - if tr.CosmosChainID == "" { - jsonAPIError(c, http.StatusBadRequest, errors.New("missing cosmosChainID")) - return - } - if tr.FromAddress == "" { - jsonAPIError(c, http.StatusUnprocessableEntity, errors.Errorf("withdrawal source address is missing: %v", tr.FromAddress)) - return - } - - relayerID := types.RelayID{Network: relay.NetworkCosmos, ChainID: tr.CosmosChainID} - relayer, err := relayers.Get(relayerID) - if err != nil { - if errors.Is(err, chainlink.ErrNoSuchRelayer) { - jsonAPIError(c, http.StatusBadRequest, err) - return - } - jsonAPIError(c, http.StatusInternalServerError, err) - return - } - - cfgs := tc.App.GetConfig().CosmosConfigs() - i := slices.IndexFunc(cfgs, func(config chainlink.RawConfig) bool { return config.ChainID() == tr.CosmosChainID }) - if i == -1 { - jsonAPIError(c, http.StatusInternalServerError, fmt.Errorf("no config for chain id: %s", tr.CosmosChainID)) - return - } - gasToken, ok := cfgs[i]["GasToken"].(string) - if !ok { - jsonAPIError(c, http.StatusBadRequest, errors.New("GasToken must be a string")) - return - } - - if gasToken != tr.Token { - jsonAPIError(c, http.StatusBadRequest, errors.Errorf("unable to convert %s to %s: %v", tr.Token, gasToken, err)) - return - } else if tr.Amount.Sign() != 1 { - jsonAPIError(c, http.StatusBadRequest, errors.Errorf("amount must be greater than zero: %s", tr.Amount)) - return - } - - err = relayer.Transact(c, tr.FromAddress, tr.DestinationAddress, tr.Amount, !tr.AllowHigherAmounts) - if err != nil { - jsonAPIError(c, http.StatusInternalServerError, errors.Errorf("failed to send transaction: %v", err)) - return - } - - resource := presenters.NewCosmosMsgResource("cosmos_transfer_"+uuid.New().String(), tr.CosmosChainID, "") - resource.State = "unstarted" - tc.App.GetAuditLogger().Audit(audit.CosmosTransactionCreated, map[string]any{ - "cosmosTransactionResource": resource, - }) - - jsonAPIResponse(c, resource, "cosmos_msg") -} diff --git a/core/web/presenters/chain_msg_test.go b/core/web/presenters/chain_msg_test.go index 036d0bc71b3..120b6cf0c53 100644 --- a/core/web/presenters/chain_msg_test.go +++ b/core/web/presenters/chain_msg_test.go @@ -8,7 +8,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/cosmostest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/solanatest" ) @@ -39,34 +38,3 @@ func TestSolanaMessageResource(t *testing.T) { assert.JSONEq(t, expected, string(b)) } - -func TestCosmosMessageResource(t *testing.T) { - t.Skip("cosmos has been deprecated") - t.Parallel() - id := "1" - chainID := cosmostest.RandomChainID() - contractID := "cosmos1p3ucd3ptpw902fluyjzkq3fflq4btddac9sa3s" - r := NewCosmosMsgResource(id, chainID, contractID) - assert.Equal(t, chainID, r.ChainID) - assert.Equal(t, contractID, r.ContractID) - - b, err := jsonapi.Marshal(r) - require.NoError(t, err) - - expected := fmt.Sprintf(` - { - "data":{ - "type":"cosmos_messages", - "id":"%s/%s", - "attributes":{ - "ChainID":"%s", - "ContractID":"%s", - "State":"", - "TxHash":null - } - } - } - `, chainID, id, chainID, contractID) - - assert.JSONEq(t, expected, string(b)) -} diff --git a/core/web/presenters/cosmos_key.go b/core/web/presenters/cosmos_key.go deleted file mode 100644 index f9d88260038..00000000000 --- a/core/web/presenters/cosmos_key.go +++ /dev/null @@ -1,34 +0,0 @@ -package presenters - -import ( - "github.com/smartcontractkit/chainlink-common/keystore/corekeys/cosmoskey" -) - -// CosmosKeyResource represents a Cosmos key JSONAPI resource. -type CosmosKeyResource struct { - JAID - PubKey string `json:"publicKey"` -} - -// GetName implements the api2go EntityNamer interface -func (CosmosKeyResource) GetName() string { - return "cosmosKeys" -} - -func NewCosmosKeyResource(key cosmoskey.Key) *CosmosKeyResource { - r := &CosmosKeyResource{ - JAID: JAID{ID: key.ID()}, - PubKey: key.PublicKeyStr(), - } - - return r -} - -func NewCosmosKeyResources(keys []cosmoskey.Key) []CosmosKeyResource { - rs := make([]CosmosKeyResource, 0, len(keys)) - for _, key := range keys { - rs = append(rs, *NewCosmosKeyResource(key)) - } - - return rs -} diff --git a/core/web/presenters/cosmos_msg.go b/core/web/presenters/cosmos_msg.go deleted file mode 100644 index d8ce73046fa..00000000000 --- a/core/web/presenters/cosmos_msg.go +++ /dev/null @@ -1,24 +0,0 @@ -package presenters - -// CosmosMsgResource represents a Cosmos message JSONAPI resource. -type CosmosMsgResource struct { - JAID - ChainID string - ContractID string - State string - TxHash *string -} - -// GetName implements the api2go EntityNamer interface -func (CosmosMsgResource) GetName() string { - return "cosmos_messages" -} - -// NewCosmosMsgResource returns a new partial CosmosMsgResource. -func NewCosmosMsgResource(id string, chainID string, contractID string) CosmosMsgResource { - return CosmosMsgResource{ - JAID: NewPrefixedJAID(id, chainID), - ChainID: chainID, - ContractID: contractID, - } -} diff --git a/core/web/presenters/node_test.go b/core/web/presenters/node_test.go index af3b277daa1..e67f42b8536 100644 --- a/core/web/presenters/node_test.go +++ b/core/web/presenters/node_test.go @@ -16,7 +16,7 @@ func TestNodeResource(t *testing.T) { var nodeResource NodeResource state := "test" cfg := "cfg" - testCases := []string{"solana", "cosmos", "starknet", "tron"} + testCases := []string{"solana", "starknet", "tron"} for _, tc := range testCases { chainID := tc + " chain ID" nodeName := tc + "_node" diff --git a/core/web/resolver/cosmos_key.go b/core/web/resolver/cosmos_key.go deleted file mode 100644 index 25a96749f5e..00000000000 --- a/core/web/resolver/cosmos_key.go +++ /dev/null @@ -1,43 +0,0 @@ -package resolver - -import ( - "github.com/graph-gophers/graphql-go" - - "github.com/smartcontractkit/chainlink-common/keystore/corekeys/cosmoskey" -) - -type CosmosKeyResolver struct { - key cosmoskey.Key -} - -func NewCosmosKey(key cosmoskey.Key) *CosmosKeyResolver { - return &CosmosKeyResolver{key: key} -} - -func NewCosmosKeys(keys []cosmoskey.Key) []*CosmosKeyResolver { - resolvers := make([]*CosmosKeyResolver, 0, len(keys)) - - for _, k := range keys { - resolvers = append(resolvers, NewCosmosKey(k)) - } - - return resolvers -} - -func (r *CosmosKeyResolver) ID() graphql.ID { - return graphql.ID(r.key.PublicKeyStr()) -} - -// -- GetCosmosKeys Query -- - -type CosmosKeysPayloadResolver struct { - keys []cosmoskey.Key -} - -func NewCosmosKeysPayload(keys []cosmoskey.Key) *CosmosKeysPayloadResolver { - return &CosmosKeysPayloadResolver{keys: keys} -} - -func (r *CosmosKeysPayloadResolver) Results() []*CosmosKeyResolver { - return NewCosmosKeys(r.keys) -} diff --git a/core/web/resolver/cosmos_key_test.go b/core/web/resolver/cosmos_key_test.go deleted file mode 100644 index 273900cb933..00000000000 --- a/core/web/resolver/cosmos_key_test.go +++ /dev/null @@ -1,74 +0,0 @@ -package resolver - -import ( - "context" - "errors" - "fmt" - "testing" - - gqlerrors "github.com/graph-gophers/graphql-go/errors" - - "github.com/smartcontractkit/chainlink-common/keystore/corekeys/cosmoskey" - "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/keystest" -) - -func TestResolver_CosmosKeys(t *testing.T) { - t.Parallel() - - query := ` - query GetCosmosKeys { - cosmosKeys { - results { - id - } - } - }` - k := cosmoskey.MustNewInsecure(keystest.NewRandReaderFromSeed(1)) - result := fmt.Sprintf(` - { - "cosmosKeys": { - "results": [ - { - "id": "%s" - } - ] - } - }`, k.PublicKeyStr()) - gError := errors.New("error") - - testCases := []GQLTestCase{ - unauthorizedTestCase(GQLTestCase{query: query}, "cosmosKeys"), - { - name: "success", - authenticated: true, - before: func(ctx context.Context, f *gqlTestFramework) { - f.Mocks.cosmos.On("GetAll").Return([]cosmoskey.Key{k}, nil) - f.Mocks.keystore.On("Cosmos").Return(f.Mocks.cosmos) - f.App.On("GetKeyStore").Return(f.Mocks.keystore) - }, - query: query, - result: result, - }, - { - name: "no keys returned by GetAll", - authenticated: true, - before: func(ctx context.Context, f *gqlTestFramework) { - f.Mocks.cosmos.On("GetAll").Return([]cosmoskey.Key{}, gError) - f.Mocks.keystore.On("Cosmos").Return(f.Mocks.cosmos) - f.App.On("GetKeyStore").Return(f.Mocks.keystore) - }, - query: query, - result: `null`, - errors: []*gqlerrors.QueryError{ - { - Extensions: nil, - ResolverError: gError, - Path: []any{"cosmosKeys"}, - Message: gError.Error(), - }, - }, - }, - } - - RunGQLTests(t, testCases) -} diff --git a/core/web/resolver/ocr2_keys.go b/core/web/resolver/ocr2_keys.go index c4c247790e1..0e4bbb9dcb8 100644 --- a/core/web/resolver/ocr2_keys.go +++ b/core/web/resolver/ocr2_keys.go @@ -19,8 +19,6 @@ type OCR2ChainType string const ( // OCR2ChainTypeEVM defines OCR2 EVM Chain Type OCR2ChainTypeEVM = "EVM" - // OCR2ChainTypeCosmos defines OCR2 Cosmos Chain Type - OCR2ChainTypeCosmos = "COSMOS" // OCR2ChainTypeSolana defines OCR2 Solana Chain Type OCR2ChainTypeSolana = "SOLANA" // OCR2ChainTypeStarkNet defines OCR2 StarkNet Chain Type @@ -40,8 +38,6 @@ func ToOCR2ChainType(s string) (OCR2ChainType, error) { switch s { case string(corekeys.EVM): return OCR2ChainTypeEVM, nil - case string(corekeys.Cosmos): - return OCR2ChainTypeCosmos, nil case string(corekeys.Solana): return OCR2ChainTypeSolana, nil case string(corekeys.StarkNet): @@ -64,8 +60,6 @@ func FromOCR2ChainType(ct OCR2ChainType) string { switch ct { case OCR2ChainTypeEVM: return string(corekeys.EVM) - case OCR2ChainTypeCosmos: - return string(corekeys.Cosmos) case OCR2ChainTypeSolana: return string(corekeys.Solana) case OCR2ChainTypeStarkNet: diff --git a/core/web/resolver/ocr2_keys_test.go b/core/web/resolver/ocr2_keys_test.go index 772cb61cb33..bdc90e37e1a 100644 --- a/core/web/resolver/ocr2_keys_test.go +++ b/core/web/resolver/ocr2_keys_test.go @@ -37,7 +37,6 @@ func TestResolver_GetOCR2KeyBundles(t *testing.T) { gError := errors.New("error") fakeKeys := []ocr2key.KeyBundle{ ocr2key.MustNewInsecure(keystest.NewRandReaderFromSeed(1), "evm"), - ocr2key.MustNewInsecure(keystest.NewRandReaderFromSeed(1), "cosmos"), ocr2key.MustNewInsecure(keystest.NewRandReaderFromSeed(1), "solana"), ocr2key.MustNewInsecure(keystest.NewRandReaderFromSeed(1), "starknet"), ocr2key.MustNewInsecure(keystest.NewRandReaderFromSeed(1), "aptos"), diff --git a/core/web/resolver/query.go b/core/web/resolver/query.go index 14a7fb53381..373c755abf6 100644 --- a/core/web/resolver/query.go +++ b/core/web/resolver/query.go @@ -607,18 +607,6 @@ func (r *Resolver) AptosKeys(ctx context.Context) (*AptosKeysPayloadResolver, er return NewAptosKeysPayload(keys), nil } -func (r *Resolver) CosmosKeys(ctx context.Context) (*CosmosKeysPayloadResolver, error) { - if err := authenticateUser(ctx); err != nil { - return nil, err - } - keys, err := r.App.GetKeyStore().Cosmos().GetAll() - if err != nil { - return nil, err - } - - return NewCosmosKeysPayload(keys), nil -} - func (r *Resolver) SuiKeys(ctx context.Context) (*SuiKeysPayloadResolver, error) { if err := authenticateUser(ctx); err != nil { return nil, err diff --git a/core/web/resolver/resolver_test.go b/core/web/resolver/resolver_test.go index 9aab34f4ff1..2f661d3d9f3 100644 --- a/core/web/resolver/resolver_test.go +++ b/core/web/resolver/resolver_test.go @@ -52,7 +52,6 @@ type mocks struct { aptos *keystoreMocks.Aptos sui *keystoreMocks.Sui stellar *keystoreMocks.Stellar - cosmos *keystoreMocks.Cosmos starknet *keystoreMocks.StarkNet tron *keystoreMocks.Tron ton *keystoreMocks.TON @@ -111,7 +110,6 @@ func setupFramework(t *testing.T) *gqlTestFramework { vrf: keystoreMocks.NewVRF(t), solana: keystoreMocks.NewSolana(t), aptos: keystoreMocks.NewAptos(t), - cosmos: keystoreMocks.NewCosmos(t), starknet: keystoreMocks.NewStarkNet(t), sui: keystoreMocks.NewSui(t), stellar: keystoreMocks.NewStellar(t), diff --git a/core/web/router.go b/core/web/router.go index e08b1b5b913..a89d7f744f7 100644 --- a/core/web/router.go +++ b/core/web/router.go @@ -275,8 +275,7 @@ func v2Routes(app chainlink.Application, r *gin.RouterGroup) { ets := EVMTransfersController{app} authv2.POST("/transfers", auth.RequiresAdminRole(ets.Create)) authv2.POST("/transfers/evm", auth.RequiresAdminRole(ets.Create)) - tts := CosmosTransfersController{app} - authv2.POST("/transfers/cosmos", auth.RequiresAdminRole(tts.Create)) + sts := SolanaTransfersController{app} authv2.POST("/transfers/solana", auth.RequiresAdminRole(sts.Create)) @@ -360,7 +359,6 @@ func v2Routes(app chainlink.Application, r *gin.RouterGroup) { kc KeysController }{ {"solana", NewSolanaKeysController(app)}, - {"cosmos", NewCosmosKeysController(app)}, {"starknet", NewStarkNetKeysController(app)}, {"aptos", NewAptosKeysController(app)}, {"stellar", NewStellarKeysController(app)}, diff --git a/core/web/schema/schema.graphql b/core/web/schema/schema.graphql index a0275af45b1..f75ad5f37e4 100644 --- a/core/web/schema/schema.graphql +++ b/core/web/schema/schema.graphql @@ -35,7 +35,6 @@ type Query { solanaKeys: SolanaKeysPayload! aptosKeys: AptosKeysPayload! suiKeys: SuiKeysPayload! - cosmosKeys: CosmosKeysPayload! starknetKeys: StarkNetKeysPayload! tronKeys: TronKeysPayload! tonKeys: TONKeysPayload! diff --git a/core/web/schema/type/cosmos_key.graphql b/core/web/schema/type/cosmos_key.graphql deleted file mode 100644 index 47de4ff9c41..00000000000 --- a/core/web/schema/type/cosmos_key.graphql +++ /dev/null @@ -1,7 +0,0 @@ -type CosmosKey { - id: ID! -} - -type CosmosKeysPayload { - results: [CosmosKey!]! -} diff --git a/core/web/schema/type/ocr2_keys.graphql b/core/web/schema/type/ocr2_keys.graphql index 89a9ef0f676..d3e14876da5 100644 --- a/core/web/schema/type/ocr2_keys.graphql +++ b/core/web/schema/type/ocr2_keys.graphql @@ -1,6 +1,5 @@ enum OCR2ChainType { EVM - COSMOS SOLANA STARKNET APTOS diff --git a/deployment/environment/web/sdk/client/types.go b/deployment/environment/web/sdk/client/types.go index 39f36f7f0c6..e4f6ff75bce 100644 --- a/deployment/environment/web/sdk/client/types.go +++ b/deployment/environment/web/sdk/client/types.go @@ -76,7 +76,6 @@ type OCR2ChainType = string const ( OCR2ChainTypeEvm = string(generated.OCR2ChainTypeEvm) - OCR2ChainTypeCosmos = string(generated.OCR2ChainTypeCosmos) OCR2ChainTypeSolana = string(generated.OCR2ChainTypeSolana) OCR2ChainTypeStarknet = string(generated.OCR2ChainTypeStarknet) OCR2ChainTypeAptos = string(generated.OCR2ChainTypeAptos) diff --git a/deployment/environment/web/sdk/internal/generated/generated.go b/deployment/environment/web/sdk/internal/generated/generated.go index b52d332506c..af018129a64 100644 --- a/deployment/environment/web/sdk/internal/generated/generated.go +++ b/deployment/environment/web/sdk/internal/generated/generated.go @@ -6390,7 +6390,6 @@ type OCR2ChainType string const ( OCR2ChainTypeEvm OCR2ChainType = "EVM" - OCR2ChainTypeCosmos OCR2ChainType = "COSMOS" OCR2ChainTypeSolana OCR2ChainType = "SOLANA" OCR2ChainTypeStarknet OCR2ChainType = "STARKNET" OCR2ChainTypeAptos OCR2ChainType = "APTOS" @@ -6402,7 +6401,6 @@ const ( var AllOCR2ChainType = []OCR2ChainType{ OCR2ChainTypeEvm, - OCR2ChainTypeCosmos, OCR2ChainTypeSolana, OCR2ChainTypeStarknet, OCR2ChainTypeAptos, diff --git a/deployment/environment/web/sdk/internal/schema.graphql b/deployment/environment/web/sdk/internal/schema.graphql index 930f5e3eda2..34a1fbc871e 100644 --- a/deployment/environment/web/sdk/internal/schema.graphql +++ b/deployment/environment/web/sdk/internal/schema.graphql @@ -35,7 +35,6 @@ type Query { solanaKeys: SolanaKeysPayload! aptosKeys: AptosKeysPayload! suiKeys: SuiKeysPayload! - cosmosKeys: CosmosKeysPayload! starknetKeys: StarkNetKeysPayload! tronKeys: TronKeysPayload! tonKeys: TONKeysPayload! @@ -202,13 +201,7 @@ type ConfigV2Payload { user: String! effective: String! } -type CosmosKey { - id: ID! -} -type CosmosKeysPayload { - results: [CosmosKey!]! -} type CSAKey { id: ID! publicKey: String! @@ -793,7 +786,6 @@ type DeleteOCRKeyBundleSuccess { union DeleteOCRKeyBundlePayload = DeleteOCRKeyBundleSuccess | NotFoundError enum OCR2ChainType { EVM - COSMOS SOLANA STARKNET APTOS diff --git a/testdata/scripts/chains/cosmos/help.txtar b/testdata/scripts/chains/cosmos/help.txtar deleted file mode 100644 index 4fe0a930ac0..00000000000 --- a/testdata/scripts/chains/cosmos/help.txtar +++ /dev/null @@ -1,16 +0,0 @@ -exec chainlink chains cosmos --help -cmp stdout out.txt - --- out.txt -- -NAME: - chainlink chains cosmos - Commands for handling cosmos chains - -USAGE: - chainlink chains cosmos command [command options] [arguments...] - -COMMANDS: - list List all existing cosmos chains - -OPTIONS: - --help, -h show help - diff --git a/testdata/scripts/chains/cosmos/list/help.txtar b/testdata/scripts/chains/cosmos/list/help.txtar deleted file mode 100644 index d1f2d166374..00000000000 --- a/testdata/scripts/chains/cosmos/list/help.txtar +++ /dev/null @@ -1,9 +0,0 @@ -exec chainlink chains cosmos list --help -cmp stdout out.txt - --- out.txt -- -NAME: - chainlink chains cosmos list - List all existing cosmos chains - -USAGE: - chainlink chains cosmos list [arguments...] diff --git a/testdata/scripts/chains/help.txtar b/testdata/scripts/chains/help.txtar index fa36a19a67c..cbb2ef80b0f 100644 --- a/testdata/scripts/chains/help.txtar +++ b/testdata/scripts/chains/help.txtar @@ -10,7 +10,6 @@ USAGE: COMMANDS: aptos Commands for handling aptos chains - cosmos Commands for handling cosmos chains evm Commands for handling evm chains solana Commands for handling solana chains starknet Commands for handling starknet chains diff --git a/testdata/scripts/help-all/help-all.txtar b/testdata/scripts/help-all/help-all.txtar index 8d7b4cab4b8..836b3bc83e0 100644 --- a/testdata/scripts/help-all/help-all.txtar +++ b/testdata/scripts/help-all/help-all.txtar @@ -27,8 +27,6 @@ bridges show # Show a Bridge's details chains # Commands for handling chain configuration chains aptos # Commands for handling aptos chains chains aptos list # List all existing aptos chains -chains cosmos # Commands for handling cosmos chains -chains cosmos list # List all existing cosmos chains chains evm # Commands for handling evm chains chains evm list # List all existing evm chains chains solana # Commands for handling solana chains @@ -72,12 +70,6 @@ keys aptos delete # Delete Aptos key if present keys aptos export # Export Aptos key to keyfile keys aptos import # Import Aptos key from keyfile keys aptos list # List the Aptos keys -keys cosmos # Remote commands for administering the node's Cosmos keys -keys cosmos create # Create a Cosmos key -keys cosmos delete # Delete Cosmos key if present -keys cosmos export # Export Cosmos key to keyfile -keys cosmos import # Import Cosmos key from keyfile -keys cosmos list # List the Cosmos keys keys csa # Remote commands for administering the node's CSA keys keys csa create # Create a CSA key, encrypted with password from the password file, and store it in the database. keys csa export # Exports an existing CSA key by its ID. @@ -175,8 +167,6 @@ node validate # Validate the TOML configuration and secrets that are passed as f nodes # Commands for handling node configuration nodes aptos # Commands for handling aptos node configuration nodes aptos list # List all existing aptos nodes -nodes cosmos # Commands for handling cosmos node configuration -nodes cosmos list # List all existing cosmos nodes nodes evm # Commands for handling evm node configuration nodes evm list # List all existing evm nodes nodes solana # Commands for handling solana node configuration @@ -192,8 +182,6 @@ nodes ton list # List all existing ton nodes nodes tron # Commands for handling tron node configuration nodes tron list # List all existing tron nodes txs # Commands for handling transactions -txs cosmos # Commands for handling Cosmos transactions -txs cosmos create # Send of from node Cosmos account to destination . txs evm # Commands for handling EVM transactions txs evm create # Send ETH (or wei) from node ETH account to destination . txs evm list # List the Ethereum Transactions in descending order diff --git a/testdata/scripts/keys/cosmos/help.txtar b/testdata/scripts/keys/cosmos/help.txtar deleted file mode 100644 index dabb4342a3a..00000000000 --- a/testdata/scripts/keys/cosmos/help.txtar +++ /dev/null @@ -1,20 +0,0 @@ -exec chainlink keys cosmos --help -cmp stdout out.txt - --- out.txt -- -NAME: - chainlink keys cosmos - Remote commands for administering the node's Cosmos keys - -USAGE: - chainlink keys cosmos command [command options] [arguments...] - -COMMANDS: - create Create a Cosmos key - import Import Cosmos key from keyfile - export Export Cosmos key to keyfile - delete Delete Cosmos key if present - list List the Cosmos keys - -OPTIONS: - --help, -h show help - diff --git a/testdata/scripts/keys/help.txtar b/testdata/scripts/keys/help.txtar index 38e3dfa4d3a..f83dcdf906b 100644 --- a/testdata/scripts/keys/help.txtar +++ b/testdata/scripts/keys/help.txtar @@ -14,7 +14,6 @@ COMMANDS: csa Remote commands for administering the node's CSA keys ocr Remote commands for administering the node's legacy off chain reporting keys ocr2 Remote commands for administering the node's off chain reporting keys - cosmos Remote commands for administering the node's Cosmos keys solana Remote commands for administering the node's Solana keys starknet Remote commands for administering the node's StarkNet keys aptos Remote commands for administering the node's Aptos keys diff --git a/testdata/scripts/nodes/help.txtar b/testdata/scripts/nodes/help.txtar index c6ffcbdd7c9..ee6f4bcd144 100644 --- a/testdata/scripts/nodes/help.txtar +++ b/testdata/scripts/nodes/help.txtar @@ -10,7 +10,6 @@ USAGE: COMMANDS: aptos Commands for handling aptos node configuration - cosmos Commands for handling cosmos node configuration evm Commands for handling evm node configuration solana Commands for handling solana node configuration starknet Commands for handling starknet node configuration diff --git a/testdata/scripts/txs/cosmos/create/help.txtar b/testdata/scripts/txs/cosmos/create/help.txtar deleted file mode 100644 index 88876b0924a..00000000000 --- a/testdata/scripts/txs/cosmos/create/help.txtar +++ /dev/null @@ -1,14 +0,0 @@ -exec chainlink txs cosmos create --help -cmp stdout out.txt - --- out.txt -- -NAME: - chainlink txs cosmos create - Send of from node Cosmos account to destination . - -USAGE: - chainlink txs cosmos create [command options] [arguments...] - -OPTIONS: - --force allows to send a higher amount than the account's balance - --id value chain ID - diff --git a/testdata/scripts/txs/cosmos/help.txtar b/testdata/scripts/txs/cosmos/help.txtar deleted file mode 100644 index 461076e9635..00000000000 --- a/testdata/scripts/txs/cosmos/help.txtar +++ /dev/null @@ -1,16 +0,0 @@ -exec chainlink txs cosmos --help -cmp stdout out.txt - --- out.txt -- -NAME: - chainlink txs cosmos - Commands for handling Cosmos transactions - -USAGE: - chainlink txs cosmos command [command options] [arguments...] - -COMMANDS: - create Send of from node Cosmos account to destination . - -OPTIONS: - --help, -h show help - diff --git a/testdata/scripts/txs/help.txtar b/testdata/scripts/txs/help.txtar index 2d707207852..1d9c3f825c1 100644 --- a/testdata/scripts/txs/help.txtar +++ b/testdata/scripts/txs/help.txtar @@ -10,7 +10,6 @@ USAGE: COMMANDS: evm Commands for handling EVM transactions - cosmos Commands for handling Cosmos transactions solana Commands for handling Solana transactions OPTIONS: