Skip to content

[Feat] add secret chain#83

Merged
RogerKSI merged 12 commits into
mainfrom
add-secret-chain
Apr 28, 2026
Merged

[Feat] add secret chain#83
RogerKSI merged 12 commits into
mainfrom
add-secret-chain

Conversation

@Marca23

@Marca23 Marca23 commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

Implementation details

Add Secret Chain

Please ensure the following requirements are met before submitting a pull request:

  • The pull request is targeted against the correct target branch
  • The pull request is linked to an issue with appropriate discussion and an accepted design OR is linked to a spec that describes the work.
  • The pull request includes a description of the implementation/work done in detail.
  • The pull request includes any and all appropriate unit/integration tests
  • You have added a relevant changelog entry to CHANGELOG_UNRELEASED.md
  • You have re-reviewed the files affected by the pull request (e.g. using the Files changed tab in the Github PR explorer)

Nattapat Iammelap added 2 commits April 8, 2026 11:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Secret Network (Cosmos SDK / CosmWasm) as a new target chain type in the relayer, including a remote-only FKMS signer flow, provider/client implementation, config parsing, and DB schema updates to record Secret transactions.

Changes:

  • Introduce secret chain provider + client to build/sign (via FKMS) and broadcast Secret txs, then poll confirmation and record metrics/DB transactions.
  • Add Secret remote-only wallet/signer integration (FKMS SignSecret) and wire it into wallet/store/config chain-type dispatch.
  • Extend DB schema/migrations to accept chain_type='secret' (Postgres enum + SQLite CHECK constraint).

Reviewed changes

Copilot reviewed 17 out of 18 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
relayer/chains/secret/config.go New Secret provider config + provider factory; sets Cosmos bech32 prefixes.
relayer/chains/secret/client.go New Cosmos/CometBFT RPC client pool for Secret (broadcast/query/tx/block/account).
relayer/chains/secret/provider.go New Secret relay loop (sign via FKMS, broadcast, confirm, metrics, DB persistence).
relayer/chains/secret/types.go Secret tx result model used by provider confirmation/persistence.
relayer/wallet/secret/wallet.go New Secret wallet constructor using remote-only adapter.
relayer/wallet/secret/types.go JSON signer payload type for FKMS Secret signing.
relayer/wallet/secret/remote_signer.go New FKMS SignSecret remote signer implementation.
relayer/config/config.go Add parsing support for chain_type = "secret" provider configs.
relayer/store/filesystem.go Wire Secret wallet creation into the store wallet factory switch.
relayer/chains/types/chain_type.go Add ChainTypeSecret and "secret" string mapping.
relayer/db/migrations/postgres/00005_add_secret_chain_type.sql Add 'secret' value to Postgres chain_type enum.
relayer/db/migrations/sqlite/00001_create_transactions.sql Expand SQLite chain_type CHECK constraint to include secret.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread relayer/chains/secret/config.go Outdated
Comment thread relayer/chains/secret/client.go Outdated
Comment thread relayer/chains/secret/client.go Outdated
Comment thread relayer/chains/secret/client.go Outdated
Comment thread relayer/chains/secret/client.go
Comment thread relayer/chains/secret/provider.go
Comment thread relayer/chains/secret/provider.go Outdated
Comment thread relayer/db/migrations/sqlite/00001_create_transactions.sql Outdated
Comment thread relayer/wallet/secret/wallet.go Outdated
Comment thread relayer/wallet/secret/remote_signer.go

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 19 out of 20 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread relayer/chains/secret/provider.go
Comment thread relayer/db/migrations/postgres/00005_add_secret_chain_type.sql Outdated
Comment thread relayer/chains/secret/client.go
Comment thread relayer/chains/secret/client.go
Comment thread relayer/chains/secret/provider.go Outdated
Comment thread relayer/chains/secret/provider.go Outdated
Comment thread relayer/chains/secret/client.go Outdated
Comment thread relayer/chains/secret/client.go
Comment thread relayer/chains/secret/config.go
Comment thread relayer/chains/secret/config.go Outdated
@Marca23
Marca23 requested a review from tanut32039 April 24, 2026 06:46
@RogerKSI
RogerKSI merged commit 9687dc5 into main Apr 28, 2026
2 checks passed
@RogerKSI
RogerKSI deleted the add-secret-chain branch April 28, 2026 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants