5
3

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.

Web3.js 1.0 で Infura を使用する

Posted at
  • Web3.js 1.0 では、HTTP provider が deprecated - 非推奨 - となっており、Websocket provider を使用する必要があります。
  • Infura の HTTP provide URL は https://mainnet.infura.io ですが、Websocket では wss://mainnet.infura.io/ws を使用します。

したがって、Web3 の初期化は次のように行います。

var web3 = new Web3('wss://mainnet.infura.io/ws');
5
3
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
5
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?