hirosystems / explorer

Explore transactions and accounts on the Stacks blockchain. Clone any contract and experiment in your browser with the Explorer sandbox.
https://explorer.hiro.so/
MIT License
136 stars 102 forks source link

Feature request: Allow searching partial addresses/-transaction hashes/-block hashes #1246

Open 314159265359879 opened 1 year ago

314159265359879 commented 1 year ago

Is your feature request related to a problem? Please describe. When I have a testnet address I often want to find the equivalent mainnet address it would be easy if I can just replace the first two letters (ST... --> SP...) copy the 4-10 characters of the testnet address and get the corresponding mainnet address (if it has gotten any activity).

This is also helpful when you can't copy/paste an address/hash but have to take it from another screen or a poor screenshot. It is nice if users do not have to type all 40 (or more) characters.

When helping other users they sometimes share the short version of their address (SP24DE...YUIW41) . It would be convenient if that was enough to find the complete address on the explorer.

Describe the solution you'd like Typing in a partial address (transaction hash or block hash) could reveal addresses/transaction hashes/block hashes that have a matching start (or end?).

Here is an example from another explorer: image

Additional info/considerations To avoid showing too big a list you could limit it to showing from SP+four (SP123A...) characters because that is what is listed in short form addresses in Xverse and Hiro. or simply show the first 10 (in alphabetic order) until enough digits are in the input to be distinct enough to show less then 10, or the only exact match.

Allowing wildcards like SP24DE*****YUIW41 to find the exact match would be nice to have.

andresgalante commented 1 month ago

We are working on an improved search that can auto-complete contract or token names, but why would a user want to search a partial hash? in general, a user would copy and paste a full hash.

what's the use case?