Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] add useEtherscanLink #2

Open
ivelin opened this issue Sep 5, 2022 · 5 comments
Open

[FEAT] add useEtherscanLink #2

ivelin opened this issue Sep 5, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@ivelin
Copy link
Collaborator

ivelin commented Sep 5, 2022

Is your feature request related to a problem? Please describe.
When users interact with on-chain data, they expect a friendly way to verify that it exists on-chain outside of the app UI. As a best practice, dapps provide a link to Etherscan web page with transaction data.

Describe the solution you'd like
A React Hook that takes as input chain ID, transaction hash or contract address and creates a populated URL to the correct chain explorer where the transaction or address are hosted.

Describe alternatives you've considered
Each app can use it's own ad hoc method for achieving this effect. I have not been able to find a common open source library with this functionality.

@ivelin ivelin added the enhancement New feature or request label Sep 5, 2022
@ivelin
Copy link
Collaborator Author

ivelin commented Sep 5, 2022

@nerderlyne what do you think about this idea. Does it belong in the Kali hooks library?

@nerderlyne
Copy link
Contributor

Need this!

It will take ->
chainId, type(tx, address), value

It will have return either ->
https://{{chainExplorer}}/tx/{{txHash}}
https://{{chainExplorer}}/address/{{address}}

I think we decided to build this on top of wagmi?
This hook can extend useNetwork so we repeat work)

Does this sound good to you? @ivelin

@nerderlyne
Copy link
Contributor

nerderlyne commented Sep 7, 2022

Need this!

It will take ->
chainId, type(tx, address), value

It will have return either ->
https://{{chainExplorer}}/tx/{{txHash}}
https://{{chainExplorer}}/address/{{address}}

I think we decided to build this on top of wagmi?
This hook can extend useNetwork so we don't repeat work

Does this sound good to you? @ivelin

@ivelin
Copy link
Collaborator Author

ivelin commented Sep 7, 2022

Need this!

It will take -> chainId, type(tx, address), value

It will have return either -> https://{{chainExplorer}}/tx/{{txHash}} https://{{chainExplorer}}/address/{{address}}

I think we decided to build this on top of wagmi? This hook can extend useNetwork so we don't repeat work

Does this sound good to you? @ivelin

Yes. All sounds good to me.

@ivelin
Copy link
Collaborator Author

ivelin commented Sep 7, 2022

I suppose after some battle testing this hook could become PR to wagmi itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants