-
Notifications
You must be signed in to change notification settings - Fork 5k
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
support optional chainId #4516
support optional chainId #4516
Conversation
This pull request is awesome. Thanks a lot. I also have the demand to set the chainId. |
ui/lib/account-link.js
Outdated
@@ -18,6 +18,7 @@ module.exports = function (address, network) { | |||
link = `https://kovan.etherscan.io/address/${address}` | |||
break | |||
default: | |||
// FIXME |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does GasTracker.io work for this purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, would be https://gastracker.io/addr/${address}
Infura doesn't support ETC, so you would need to provide a default RPC provider or enforce a custom RPC URL for non-Infura networks. |
Does Infura provides something specific for metamask, or standard web3 JSON RPC would work? If later works, there is one at https://web3.gastracker.io |
@splix I believe they would only have to support the RPC methods listed at https://github.com/MetaMask/provider-engine#current-rpc-method-support Based on this article they may support them. |
case 'classic': | ||
title = 'Current Network' | ||
value = 'Ethereum Classic Network' | ||
break |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly, you could add the ETC Testnet, Morden.
I'm surprised information about a network is not already centralized in an object. That might be a good refactor, though perhaps outside the scope of this pull request. |
Another issue here is showing conversion rate |
'blockExplorerTX': 'https://gastracker.io/tx/[[txHash]]', | ||
'blockExplorerAddr': 'https://gastracker.io/addr/[[address]]', | ||
'service': 'epool.io', | ||
'rpcUrl': 'https://mew.epool.io', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
like as myetherwallet's app/scripts/nodes.js
, the networks.js
is the predefined rpcUrl
+ chainId
and more.
screenshot updated, etc.
|
c3d16ec
to
722802f
Compare
This is a new UI testing result. https://gastracker.io/tx/0x44fce132106162045005ee5815bffc0b95a5a8b6845273f4fbda2e5f5d97c7cb |
and this is an old-UI test. https://gastracker.io/tx/0x0c4e26058a4fc2e59431db05a061710a34b333aceb6b804444a3abbd94df35c1 |
0a401b8
to
4d02967
Compare
'blockExplorerAddr': 'https://gastracker.io/addr/[[address]]', | ||
'blockExplorerToken': 'https://gastracker.io/token/[[tokenAddress]]/[[address]]', | ||
'service': 'Ethereum Commonwealth', | ||
'rpcUrl': 'https://etc-geth.0xinfra.com', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where can I find api server for the modern testnet?
https://web3.gastracker.io/morden not correctly work...
'blockExplorerAddr': 'https://gastracker.io/addr/[[address]]', | ||
'blockExplorerToken': 'https://gastracker.io/token/[[tokenAddress]]/[[address]]', | ||
'service': 'Gastracker.io', | ||
'rpcUrl': 'https://web3.gastracker.io/morden', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://web3.gastracker.io/morden is not work correctly with MetaMask.
@pyskell // is there any official api-server/block explorer exist for the Morden testnet ?
http://mordenexplorer.ethertrack.io looks good to me.
1a3c090
to
8d26a69
Compare
'blockExplorerAddr': 'http://mordenexplorer.ethertrack.io/addr/[[address]]', | ||
'blockExplorerToken': 'http://mordenexplorer.ethertrack.io/token/[[tokenAddress]]/[[address]]', | ||
'service': 'Gastracker.io', | ||
'rpcUrl': 'https://etc-geth.0xinfra.com', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FIXME
is there any official json rpc api-server/block explorer exist for the Morden testnet ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe contact the ETC rpc providers about adding support for the testnet. If there isn't a reliable rpc provider for the ETC testnet, don't list it among the supported networks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hackmod Remove modern testnet, no one is using ethereum classic testnet for testing purpose. Why do we need the option??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. as you already know, this is a quick hack and I'm not much familiar with a react program.
we need more testing to find possible bugs. that's the reason the morden testnet added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hackmod I've opened a public rpc endpoint for morden testnet
Hope we can go forward 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And my personal opinion is, we don't have to suppot additional api endpoint for chain-id.
It is needed however we can just hardcode for this case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
temporary added morden api server.
but the api server provided by other coin project seems improper to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hackmod Then remove useless morden testnet menu, we've added the endpoint only for this PR merge if you don't need it we will close then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed and rebased
* fixed custom Rpc form to support optional chainid * experimental ETC support added
* etc logo added * price info from https://min-api.cryptocompare.com/
* fixup for testnet faucet
I've tried it with a custom RPC and ticker symbol, seems to work fine, didn't encounter any bugs. keep up the good work! |
This is nice work, but we are not ready to add a bunch of new networks and providers to our menu. If all this PR did was add an optional chainId parameter, we would merge it much more easily, but it instead adds many other things as well, which we are simply not ready to do at this time. You can read more about our roadmap and vision for supporting multiple networks here: |
@danfinlay the following screen shot is mere an example. all question mark prefixed items are configured by user by means of settings menu (Custom RPCs). and the only newly added menu item is ETC. optional chain_id feature and pre-configured menu(ETC) shares their code, that's why this PR named as "optional chain Id" anyway, I will separate this issue into several PRs, for example,
|
Hey guys and gals. Everything looks good. Anything we still need to help out with to get it shipped with ETC cupport? |
Thank u, big ups!
…On Mon, Oct 15, 2018 at 12:50 PM bobby dresser ***@***.***> wrote:
@irthos <https://github.com/irthos> we've moved to #5134
<#5134> which we'll
review this week once we get #4510
<#4510> merged!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4516 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACcpoE4n5f-p7mfT5-dxTj7-rlQA19Sbks5ulLy-gaJpZM4UbwM6>
.
|
This is an experimental work (WIP)
Basically this PR is based on the net_version hack (by @turbobits)
Currently, MetaMask get the chainId using
net_version
rpc call butnet_version
does not return the realchainId
. there are nonet_chainid
noreth_chainid
rpc call exist. ethereum/go-ethereum#15002chainId != networkId
.Done
rpcUrl
+chainId
[x] MORDEN testnet addedToDo
[x] FIXME morden api server urlneed some feed back!
References
Screenshot