Skip to content

feat: add more details to the tx output #250

@aelesbao

Description

@aelesbao

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:

$ 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.

$ 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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions