oasisprotocol / oasisprotocol/cli

QoL: `oasis paratime show` should support Ethereum transaction IDs (with optional `0x` prefix)

Open
#135 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement ethereum ui
Dominant language
Go
Stars
80
Forks
23
Avg merge
9h 43m
Merged PRs (30d)
3

Description

To improve quality of life it would be good if either the Oasis transaction hash or Ethereum transaction hash can be specified, with optional 0x prefix for the oasis paratime show command.

These both work:

oasis paratime show 2781982 985ab24c970a7901b864a89f26e54d14223e65d4edecca861cba8ec00becffc9 --network testnet
oasis paratime show 2781982 0 --network testnet

But, passing the 'Eth Hash' (0x4fcd824e3ca229b9703bf5887d70a99901268fe262bff1037929a1f4e708f860) doesn't work.

$ ./oasis paratime show 2781982 0x4fcd824e3ca229b9703bf5887d70a99901268fe262bff1037929a1f4e708f860 --network testnet 
Error: malformed tx hash: encoding/hex: invalid byte: U+0078 'x'

and

$ ./oasis paratime show 2781982 4fcd824e3ca229b9703bf5887d70a99901268fe262bff1037929a1f4e708f860 --network testnet 
...
Error: failed to find transaction with hash 4fcd824e3ca229b9703bf5887d70a99901268fe262bff1037929a1f4e708f860

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the oasis paratime show command entry point and reproduce the supplied testnet commands with Oasis and Ethereum hashes. Trace the transaction-hash parsing and lookup flow, including the optional 0x prefix. Done means both hash types work with and without the prefix, while existing Oasis hash behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
blockchain, cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.