archway-network / archway-network/cli

feat: add more details to the tx output

Open
#250 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
42
Forks
19
PR merge metrics
No merged PRs in 30d

Description

## Description

Currently, every transaction in the CLI outputs only the tx hash with a small amount of metadata regarding the execution. To improve the visibility of other details without requiring the user to visit an explorer, the CLI can enhance the output by displaying more information in the tx response.

## Technical Details

**Current output of the `contracts execute` command:**

```console
$ archway contracts execute increment --from deployer --args '{ "increment": {} }'
Executing contract increment
Chain: constantine-3
Signer: deployer

✅ Executed contract increment-0.2.0
Transaction: 632FCC96D8FCBDE2838DD301DEE38CF9DA8B593380FBD5E65B057D2907DC13C3
```

**Expected output:**

> The `view in the explorer` should link to the first explorer's `tx_page` available in the chain registry file and displayed only in [terminals with hyperlink support](https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda).

```console
$ archway contracts execute increment --from deployer --args '{ "increment": {} }'
Executing contract increment
Chain: constantine-3
Signer: deployer

✅ Executed contract increment-0.2.0

Transaction ([view in the explorer])
632FCC96D8FCBDE2838DD301DEE38CF9DA8B593380FBD5E65B057D2907DC13C3

Block: 32852 Gas wanted: 210480
Timestamp: 2023-10-09T17:47:45Z Gas used: 183893

Fee: 0,189432 ARCH (189432000000000000aarch)
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the `contracts execute` command and trace how its transaction response is rendered, then inspect the chain registry file for the first available `tx_page`. Check the linked terminal hyperlink guidance. Done means the output includes block, timestamp, gas, and fee details, with an explorer link shown only when hyperlink support is available.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
blockchain, cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.