2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

getho.ioのアカウントロックの外し方

Last updated at Posted at 2019-04-12

※追記
gethoさんサービス終了してしまったようで、、、残念です。
MyEthereumWalletとかでも同じようなことできるのでお試しください。
やっぱりRemixさいつよな気もしてます。

gethoとは

Ethereumのプライベートチェーンを作って開発用に利用できるサービス。
ドメインを共有することで、複数人でプライベートチェーンを共有でき、
もちろんスマートコントラクトもデプロイできる。
デプロイしたコントラクトは実際にgetho上で実行でき、直感的にデバッグもできる優れもの。

使い方

本家のHow to deployを見ましょう!
https://getho.io/document/deploy?subdomain=scaly-chimpanzee-41050

まず普通にgetho.ioにログインしてノードを立てる。

Truffleからアクセスできるようにtruffle-config.jsのnetworksに下記を追加

getho: {
      host: "[自分のノードID/jsonrpc]",
      port: 80,
      network_id: 1010,
      gas: 4712388
}

これでtruffle migrate --network getho --reset --compile-all
でもやればgethoにデプロイできる。

functionが実行できない!

gethoにはあらかじめ3つのアカウントが用意されているが、一人目以外のアカウントはロックがかかった状態になっており、実行しようとすると認証エラーで利用できない。

authentication needed: password or unlock

アカウントロックの外し方

※下記で検証

Node v11.1.0
Truffle v5.0.5
web3 1.0.0-beta.37

truffleでは開発用gethコンソールにtruffle develop でアクセスできますが、
gethクライアントでgethoにアクセスするには下記を実行

truffle console --network getho

残高を確認する下記コマンドで疎通を確認できる。

balance = await web3.eth.getBalance("[アカウントアドレス]")
balance

アカウントロックを外したいならdocの通り下記を実行することでロック解除できる。
https://web3js.readthedocs.io/en/1.0/web3-eth-personal.html#unlockaccount

web3.eth.personal.unlockAccount('[アカウントアドレス]', '[アカウント秘密鍵]', 0)

trueが返ればOK!

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?