playground

The world is a playground.

Ethereum の最小ガスリミット

Ethereum の最小ガスリミットは、21,000 です。 Ether の送付だけであれば、手数料は 21,000 x ガスプライスとなります。

Ethereum の「イエローペーパー」とは何か?

Ethereum の「イエローペーパー/Yellow Paper」は、Ethereum の技術仕様書です。 Ethereum のイエローペーパー https://ethereum.github.io/yellowpaper/paper.pdf Bitcoin と同様に Ethereum にもホワイトペーパー(いわゆるプロジェクトのコンセプトを説明…

Web3.js でプロバイダが MetaMask かどうかをチェック

web3.currentProvider.isMetaMask

MetaMask を使用した Web3 の初期化

MetaMask は Chrome プラグインとして使える大変便利な Ethereum ウォレットです。 MetaMask を使用するとボタン 1 つでトランザクションに署名ができるので、エンドユーザーが DApps を使用する際に重宝します。 MetaMask を使用した Web3 の初期化 MetaMas…

Web3.js で現在のハッシュレートを確認

web3.eth.getHashrate を使用します。 サンプルコード web3.eth.getHashrate() .then(console.log); // => 1234 Reference https://scrapbox.io/web3-jp/web3.eth%23getHashrate

Web3 でノードがマイニングしているかどうかを確認

web3.eth.isMining を使用します。 マイニングしていれば true を、それ以外の場合は false を返します。 サンプルコード web3.eth.isMining() .then(console.log); // => true 参考 https://scrapbox.io/web3-jp/web3.eth%23isMining

Ethereum ブロックチェーンの現在のブロック高を取得

const Web3 = require('Web3'); var web3 = new Web3('https://mainnet.infura.io'); web3.eth.getBlockNumber() .then(console.log);