Skip to content

feat(cli): attestor/relayer grpc query commands + IFT mint/send - #1368

Merged
dhfang merged 10 commits into
mainfrom
feat/link-cli-commands
Aug 13, 2026
Merged

dhfang merged 10 commits into
mainfrom
feat/link-cli-commands

Conversation

@dhfang

@dhfang dhfang commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Adds commands for interacting with the grpc api and ifts

ibc attestor info <name> [--host host:port]
ibc attestor latest-height <name> [--host host:port]
ibc attestor state-attestation <name> --height N [--host host:port]

ibc relayer relay --tx-hash <hash> --chain-id <id> [--host host:port]
ibc relayer status --tx-hash <hash> --chain-id <id> [--host host:port]

ibc tx ift mint --chain <id> --ift <address> --to <recipient|signer-alias> --amount <base-units> --from <signer-alias>
ibc tx ift send --chain <id> --ift <address> --client-id <id> --to <receiver|signer-alias> --amount <base-units> --from <signer-alias> [--timeout 15m]

ibc deploy show <chain-id> [--manifest-dir deployments]

packet-attestation was left out for now — constructing a valid request means hand-assembling ABI-encoded IBC packet bytes, which isn't something anyone would do by hand and it's not something people will use for the walkthrough demo

@dhfang
dhfang requested a review from a team as a code owner August 12, 2026 15:55
@dhfang dhfang changed the title Feat/link cli commands feat(cli): attestor/relayer query commands + IFT mint/send Aug 12, 2026
@greptile-apps

greptile-apps Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR adds CLI commands for querying attestors, triggering and inspecting relays, and minting or transferring IFT tokens.

  • Adds Connect RPC clients for local attestor and relayer services.
  • Adds EVM-backed IFT mint and cross-chain send transaction commands.
  • Registers the new command hierarchy, flags, address normalization, and focused helper tests.

Confidence Score: 4/5

The PR should not merge until IFT commands reject non-EVM chain configurations instead of panicking; timeout validation is also worth tightening.

Selecting a valid configured chain without an EVM section reaches an unconditional chain.EVM.RPC dereference, while non-positive timeout durations can create expired or wrapped transfer timestamps.

Files Needing Attention: link/cmd/ibc/ift.go and link/cmd/ibc/main.go

Important Files Changed

Filename Overview
link/cmd/ibc/attestor.go Adds attestor RPC query commands, local-attestor validation, address normalization, and an h2c-capable HTTP client.
link/cmd/ibc/relayer.go Adds commands to trigger relay processing and query packet status through the configured relayer RPC server.
link/cmd/ibc/ift.go Adds IFT mint and send transactions, but unsupported chain configurations can panic and timeout inputs are not validated.
link/cmd/ibc/main.go Registers the new commands and flags; the unrestricted IFT timeout flag permits non-positive values.
link/cmd/ibc/attestor_test.go Covers local-attestor selection and normalization of unspecified listener addresses.
link/cmd/ibc/ift_test.go Covers decimal amount parsing but not chain-type or timeout validation paths.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  CLI[ibc CLI] --> A[attestor queries]
  CLI --> R[relayer relay/status]
  CLI --> T[tx ift]
  A --> C[Connect RPC client]
  R --> C
  T --> D[dial configured EVM chain]
  D --> M[mint]
  D --> S[cross-chain send]
Loading

Reviews (1): Last reviewed commit: "add ibc tx ift mint/send commands" | Re-trigger Greptile

Comment thread link/cmd/ibc/ift.go
Comment thread link/cmd/ibc/ift.go
@dhfang dhfang changed the title feat(cli): attestor/relayer query commands + IFT mint/send feat(cli): attestor/relayer grpc query commands + IFT mint/send Aug 12, 2026
@dhfang
dhfang force-pushed the feat/link-cli-commands branch from 5acdc48 to 99fa3de Compare August 13, 2026 07:08
@dhfang
dhfang force-pushed the feat/link-cli-commands branch 2 times, most recently from d48e7ff to 3dc23d7 Compare August 13, 2026 07:21
@dhfang
dhfang force-pushed the feat/link-cli-commands branch 2 times, most recently from c3817ef to 95632f2 Compare August 13, 2026 14:29
@dhfang
dhfang force-pushed the feat/link-cli-commands branch from 95632f2 to 438d532 Compare August 13, 2026 15:30
Comment thread link/cmd/ibc/attestor.go Outdated
Comment thread link/cmd/ibc/relayer.go
}

client := relayerv2.NewRelayerApiServiceClient(
newGRPCHTTPClient(), "http://"+dialableAddress(address), connect.WithGRPC(),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

https?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Link doesn't support tls yet 😬

Base automatically changed from feat/connection-first-config to main August 13, 2026 16:22
dhfang added 10 commits August 14, 2026 00:22
…endpoint

Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
…onvention

these commands deliberately follow cosmos-sdk's tx <module> <action>
[positional args] [flags] idiom (core args positional, --chain/--ift/--from
shared as flags) rather than deploy's all-flag style -- add Example lines
and a parent Long blurb so that split is visible from --help instead of
being something a first run has to discover by guessing wrong

Signed-off-by: Dennis Fang <dhsfang@gmail.com>
deploy's commands (core/client/gmp/ift/ift-bridge/status) take no
positional args; ift mint/send were the only tx commands mixing
positional core args with flags, following cosmos-sdk's tx convention
instead. Converts to --to/--amount (mint) and --client-id/--to/--amount
(send) so every deploy/tx command in this CLI shares one shape

Signed-off-by: Dennis Fang <dhsfang@gmail.com>
… status

- new `ibc deploy show [chain-id]`: prints the recorded manifest as-is

- `ibc tx ift mint/send --to` now also accepts a configured signer
  alias (resolved to its derived EVM address), not just a raw hex
  address, matching how --from/--attestors already work elsewhere

- `ibc relayer status`/`relay` now print via protojson instead of
  encoding/json, so PacketState renders as its name
  (PACKET_STATE_PENDING) instead of a bare integer

Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
…-hash/--chain-id interface

Signed-off-by: Dennis Fang <dhsfang@gmail.com>
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
@dhfang
dhfang force-pushed the feat/link-cli-commands branch from 17e5027 to c133b82 Compare August 13, 2026 16:22
@dhfang
dhfang merged commit 26efeef into main Aug 13, 2026
19 checks passed
@dhfang
dhfang deleted the feat/link-cli-commands branch August 13, 2026 16:29
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.

2 participants