有的,这个文章有介绍: EIP-3085: 自定义钱包网络,用二层网络更方便
例如添加一个Fantom网络方法如下:
addChain() {
var method = 'wallet_addEthereumChain'
var params = [
{
"chainId": "0xfa",
"chainName": "Fantom Opera Mainnet",
"rpcUrls": ["https://rpcapi.fantom.network"],
"nativeCurrency": {
"name": "ftm",
"symbol": "ftm",
"decimals": 18
},
"blockExplorerUrls": ["https://ftmscan.com"]
}
]
web3.currentProvider.sendAsync({
method,
params
}, function (err, result) {
if (err) {
console.log('添加失败')
return false
}
})
},