Parity

如何將乙太坊更改為其他名稱

  • April 5, 2021

我用parity部署私鏈,想把“ethereum”改成“abc”,怎麼辦?

在我的 Genesis 文件中,我修改了一個名為 subprotocolName 的參數,但我使用 MetaMask 測試傳輸,始終顯示“ETH”

先謝謝了。

我的創世紀文件demo.json

{
 "name": "ABC",
 "engine": {
   "authorityRound": {
     "params": {
       "stepDuration": "5",
       "validators": {
         "list": [
           "0xf848e3f82c239a50d0d800827e281bf7eaf9af7e"
         ]
       },
       "blockReward": "0x4563918244F40000"
     }
   }
 },
 "params": {
   "subprotocolName": "abc",
   "gasLimitBoundDivisor": "0x0400",
   "maximumExtraDataSize": "0x20",
   "minGasLimit": "0x1388",
   "networkID": "6652",
   "chainID": "6652"
 },
 "genesis": {
   "seal": {
     "authorityRound": {
       "step": "0x0",
       "signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
     }
   },
   "difficulty": "0x20000",
   "gasLimit": "0x1809d484"
 },
 "accounts": {
   "0xd43a23a3702C5C082b2b924AA42194CEd7bFaeAc": {
     "balance": "10000000000000000000000"
   },
   "0x0000000000000000000000000000000000000001": {
     "balance": "1",
     "builtin": {
       "name": "ecrecover",
       "pricing": {
         "linear": {
           "base": 3000,
           "word": 0
         }
       }
     }
   },
   "0x0000000000000000000000000000000000000002": {
     "balance": "1",
     "builtin": {
       "name": "sha256",
       "pricing": {
         "linear": {
           "base": 60,
           "word": 12
         }
       }
     }
   },
   "0x0000000000000000000000000000000000000003": {
     "balance": "1",
     "builtin": {
       "name": "ripemd160",
       "pricing": {
         "linear": {
           "base": 600,
           "word": 120
         }
       }
     }
   },
   "0x0000000000000000000000000000000000000004": {
     "balance": "1",
     "builtin": {
       "name": "identity",
       "pricing": {
         "linear": {
           "base": 15,
           "word": 3
         }
       }
     }
   }
 }
}

我的節點配置文件node0.toml

[parity]
chain = "demo.json"
base_path = "parity0"

[account]

unlock = ["0xf848e3f82c239a50d0d800827e281bf7eaf9af7e"]
password = ["node.pwds"]

[network]
port = 30304
min_peers = 6
max_peers = 12
nat = "any"
id = 6652
bootnodes = []
discovery = true
warp = true
allow_ips = "all"
snapshot_peers = 0
max_pending_peers = 64
no_serve_light = false
reserved_peers="./reservedPeers.enode"
reserved_only=false

[rpc]
port = 8544
interface = "all"
cors=["chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn"]
apis = ["web3", "eth", "pubsub", "net", "parity", "parity_pubsub", "traces", "rpc", "shh", "shh_pubsub"]
hosts = ["all"]

[websockets]
port = 8180
interface = "all"
origins = ["none"]
apis = ["web3", "eth", "pubsub", "net", "parity", "parity_pubsub", "traces", "rpc", "shh", "shh_pubsub"]
hosts = ["all"]

[ipc]
disable = false
path = "$HOME/.local/share/io.parity.ethereum/jsonrpc.ipc"
apis = ["web3", "eth", "pubsub", "net", "parity", "parity_pubsub", "parity_accounts", "traces", "rpc", "shh", "shh_pubsub"]

[mining]
author = "0xf848e3f82c239a50d0d800827e281bf7eaf9af7e"
engine_signer = "0xf848e3f82c239a50d0d800827e281bf7eaf9af7e"
notify_work = ["http://localhost:3001"]
force_sealing = true
reseal_on_txs = "all"

我的奇偶校驗啟動命令

parity-ethereum-2.1.10/target/release/parity --config ./node0.toml --jsonrpc-cors "chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn"

要使用您自己的符號,您必須從 Metamask 進行配置。

從網路/自定義 RPC/顯示高級選項/符號。

您的 geth 名稱是 Abc,但預設情況下 metamask 將其命名為 eth。您應該更改元遮罩設置中的參數

引用自:https://ethereum.stackexchange.com/questions/64571