1. Open TextEdit

  2. Paste key into TextEdit without any extra characters or quotations

  3. Save the file as pk.txt to your Desktop

  4. Open Terminal, run command:

    geth account import ~/Desktop/pk.txt
    
  5. After successful import, delete the file from your desktop.

.\geth account import pk.txt,pk.txt放入没有0x前缀的私钥。按之前的命令重启geth进入控制台

(如:geth –testnet –rpcapi=”db,eth,net,web3,personal,web3″ –rpc –rpcaddr 0.0.0.0 –rpcport 8080 –rpccorsdomain “*” –verbosity 3 console –cache=4096)

,输入 personal.listAccounts 查看是否导入成功

版权声明:本文为x-poior原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/x-poior/p/11010033.html