2
4

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.

スマートコントラクト開発で知っておくべきことのメモ(ethereum7)

Last updated at Posted at 2018-01-09

前回はこちら。スマートコントラクト開発でHello Worldをする

開発環境について

Browser-Solidityを使う

URLはこちら

https://github.com/ethereum/browser-solidity
branchはgh-pages

スクリーンショット 2018-01-09 19.01.17.png

Zipファイルをダウンロードする

スクリーンショット 2018-01-09 19.01.32.png

解凍してindex.htmlをクリックします

スクリーンショット 2018-01-09 19.06.18.png

この画面がbrowserでオープンします。

スクリーンショット 2018-01-09 19.07.37.png

Web3 Providerを選択。

スクリーンショット 2018-01-09 19.09.37.png

VagrantのIPアドレスを確認して、その値を入力します。

スクリーンショット 2018-01-09 19.14.15.png

これで、開発マシンと接続しました。

Etherの単位

単位 Wei Value Wei
wei 1 wei 1
szabo 10^12 wei 1,000,000,000,000
finney 10^15 wei 1,000,000,000,000,000
ether 10^18 wei 1,000,000,000,000,000,000

時間の単位

単位 Seconds units
seconds 1 1
minutes 60 60 seconds
hours 3600 60 minutes
days 86400 24 hours
weeks 604800 7 days
years 31536000 365 days

ブロックのプロパティ

グローバル変数 データ型 説明
block.blockhash(uint blockNumber) bytes32 指定したブロックのハッシュ
block.coinbase address カレントブロックのマイナーのアドレス
block.number uint カレントブロックの番号
block.timestamp uint カレントブロックのタイムスタンプ
msg.sender address 送信者アドレス(現在の呼び出し)
msg.value uint 送金額
now uint block.timestamp のエイリアス
2
4
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
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?