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

Add BlockExplorer information #59

Closed
ligi opened this issue May 7, 2019 · 16 comments
Closed

Add BlockExplorer information #59

ligi opened this issue May 7, 2019 · 16 comments
Labels
discussion enhancement New feature or request

Comments

@ligi
Copy link
Member

ligi commented May 7, 2019

It would be great to have information about blockexplorers for the chains. It would be even better if this information is enough to generate links for [transactions,addresses,..]

@ligi ligi added discussion enhancement New feature or request labels May 7, 2019
@freeatnet
Copy link

freeatnet commented May 7, 2019

Would it be reasonable to assume that all chain explorers would allow access by transaction hash and by wallet address of canonical formats?

If so, we could introduce something like key "explorers": [ <ExplorerEntry>, … ], with explorer entry consisting of:

{
  "name": "Etherscan",
  "logo": "", # optional
  "homepage": "https://etherscan.io/",
  "address": "https://etherscan.io/address/${address}",
  "tx": "https://etherscan.io/address/${txHash}",
  "block": "https://etherscan.io/address/${blockNumber}", # optional?
  "token": "https://etherscan.io/token/${address}" # definitely optional
}

@ligi
Copy link
Member Author

ligi commented May 7, 2019

Yes - I think this makes sense - perhaps even as a separate repo/dataset

@ligi
Copy link
Member Author

ligi commented May 7, 2019

wait no - sometimes the chain is part of the URL - that makes things more complicated.
But adding it to every chain is a lot of repitition

@freeatnet
Copy link

@ligi Sorry, do you mean adding a list of links would be a lot of repetition?

Also, would you happen to have some examples of other explorers?

@ligi
Copy link
Member Author

ligi commented May 7, 2019

yea it is then not using the structure of the urls like here:

https://github.com/komputing/KEthereum/tree/master/blockscout
https://github.com/komputing/KEthereum/tree/master/etherscan

these are also the only blockexplorers I worked with

but perhaps it is best to keep it this simple and ignore the WETness

@freeatnet
Copy link

@ligi I see what you mean now. I suspect only a few chains will have multiple explorers and, conversely, few explorers will support multiple chains. I’ll try to gather up some links.

@Garito
Copy link

Garito commented Dec 29, 2020

Hi
Any progress with this?

@pedrouid
Copy link
Collaborator

pedrouid commented Jan 2, 2021

Actually I've recently written a proposal regarding this topic: ethereum/EIPs#3091

Perhaps we could reach out to projects like Blockscout to provide corresponding redirects

Meanwhile we could already include Etherscan as it already matches the proposed API for EIP-3091

@Garito
Copy link

Garito commented Jan 2, 2021

Nice... can't wait for it (kid face waiting like if it was the new toy)
Thanks

@Garito
Copy link

Garito commented Mar 5, 2021

Now that metamask has added wallet_addEthereumChain with explorers included, is more than ever important to add this data
https://docs.metamask.io/guide/rpc-api.html#wallet-addethereumchain
Any idea when will be added?

@ligi
Copy link
Member Author

ligi commented Mar 5, 2021

How do you see this repo being used in combination with MM?

@Garito
Copy link

Garito commented Mar 5, 2021

My to cents on the explorers I am using right now:

{
  1: 'https://etherscan.io/${type}/${value}',
  3: 'https://ropsten.etherscan.io/${type}/${value}',
  4: 'https://rinkeby.etherscan.io/${type}/${value}',
  5: 'https://gorli.etherscan.io/${type}/${value}',
  42: 'https://kovan.etherscan.io/${type}/${value}',
  56: 'https://bscscan.com/${type}/${value}',
  97: 'https://testnet.bscscan.com/${type}/${value}'
}

where type is the type of the request. I am using tx and address right now but I have noticed there are others you can use (would be nice if someone has found the complete list and share it here)

and value is the value of what you are looking for. The transaction hash for type tx or the address of the account or token for the type address

@Garito
Copy link

Garito commented Mar 5, 2021

Seems that this is enough:

{
  1: 'https://etherscan.io',
  3: 'https://ropsten.etherscan.io',
  4: 'https://rinkeby.etherscan.io',
  5: 'https://gorli.etherscan.io',
  42: 'https://kovan.etherscan.io',
  56: 'https://bscscan.com',
  97: 'https://testnet.bscscan.com'
}

@ligi
Copy link
Member Author

ligi commented Apr 3, 2021

OK need to push this forward. I suggest the following:

{
    ...
	"explorers": [{
		"name": "etherscan",
		"url": "https://etherscan.io",
		"icon": [
		  // same as for chain icons
		],
		"standard": "EIP3091"
	}]
}

name, URL and standard are mandatory. icon can be an empty array
using @pedrouid s standard here prevents the duplication and is a forcing function to get block-explorers to unify.
wondering though if EIP3091 should be lifted out to an CAIP before we use it - would be more consistent and unopinionated I think

@tjayrush
Copy link

This doesn't really work for the case where the explorer is local such as ours (TrueBlocks).

Our explorer's URL is https://localhost:${port}/${type}/${value}.

But then what happens if a user has two such local explorers? Not both can be in your list since the name fields would be different (both would want to use localhost).

Perhaps it's okay to duplicates in the list based on URL? (Most likely not).

Don't forget that some explorers are actually decentralized and have nothing to do with a web 2.0 website.

@tjayrush
Copy link

This doesn't really work for the case where the explorer is local such as ours (TrueBlocks).

Our explorer's URL is https://localhost:${port}/${type}/${value}.

But then what happens if a user has two such local explorers? Not both can be in your list since the name fields would be different (both would want to use localhost).

Perhaps it's okay to duplicates in the list based on URL? (Most likely not).

Don't forget that some explorers are actually decentralized and have nothing to do with a web 2.0 website.

Bump?

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

No branches or pull requests

5 participants