This topic is for discussing EIP-3085. Discussion was originally located at this GitHub issue on the EIPs repository.
Discussion is expected to pick up again as 3085 moves to Review and then Last Call.
This topic is for discussing EIP-3085. Discussion was originally located at this GitHub issue on the EIPs repository.
Discussion is expected to pick up again as 3085 moves to Review and then Last Call.
A draft PR is up for a related method, wallet_switchEthereumChain
: https://github.com/ethereum/EIPs/pull/3326
Instead of decimals
, consider requiring a scaling factor instead. This would allow chains that have scaling factors other than base 10 to be supported. Ethereum would be 10^18
but other-chain may be 2^32
.
Oh, interesting idea. Something like scalingFactor: string
matching RegEx /[1-9]\d*\^[1-9]\d*/
? Or maybe scalingFactor: [base: number, exponent: number]
where the tuple members are positive integers?
Then we could make scalingFactor
mutually exclusive with decimals
.
Scaling factor can just be a QUANTITY
(hex string encoded number). No need for anything fancy here I think.
Ah, naturally. Iâll PR that in the morning
Hello,
I am facing an issue while calling wallet_addEthereumChain.
I will appreciate it if you can help me to fix this issue.
ethereum.request({
method: âwallet_addEthereumChainâ,
params: [{
âchainIdâ: â0x3â,
âchainNameâ: âRopsten Networkâ,
ârpcUrlsâ: [
âhttps://ropsten.infura.io/v3/4ee71c3a70404cf8b1241df95bbc1347â,
],
âiconUrlsâ: [
âhttps://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0/logo.pngâ
],
ânativeCurrencyâ: {
ânameâ: âETHER Tokenâ,
âsymbolâ: âETHâ,
âdecimalsâ: 18
}
}]
And this is the issue:
Thanks in advance.
Actually, I added blockExplorerUrls to the params. Sorry to forgot adding it to the code.
âblockExplorerUrlsâ: [
âhttps://ropsten.etherscan.ioâ
],
FYI, I confirmed that my Infura Project ID is working. This issue is definitely related to the ârpcUrlsâ.
When I change it to âhttps://dai.poa.networkâ with xDAI Chain, it perfectly worked.