LoginSignup
6
1

More than 5 years have passed since last update.

CryptoZombiesでSolidity@咀嚼中

Last updated at Posted at 2018-02-18

Yukiya025の目標など

CryptoZombies進捗

  • Lesson1 全クリア (2018/02/17)
  • Lesson2 Chapter03 までクリア (2018/02/17)
  • Lesson2 全クリア (2018/02/18)
  • Lesson3 Chapter07 までクリア (2018/02/18)
  • Lesson3 Chapter11 までクリア (2018/02/20)
  • Lesson3 全クリア (2018/02/23)
  • Lesson4 Chapter03 までクリア (2018/02/24)
  • Lesson4 Chapter09 までクリア (2018/03/01)
  • Lesson4 全クリア (2018/03/02)

目指せご褒美 & 3周♪

この記事で伝えたいこと

  • CryptoZombiesでSolidityのどんな知識が身につくか
  • 他にも「この学習サイトもおすすめ!」があればコメント欄へぜひ

Lesson1Chapter1-2で学んだこと

  • コードを書く前にpragma solidity ^0.4.19;をつける
  • コントラクトとは、イーサリアムアプリケーションの基本ブロック。プロジェクトの出発点であり、コントラクトの中に変数や関数が入る。おそらくその他のオブジェクトも入るか?
pragma solidity ^0.4.19;
contract HelloWorld {
// 変数や関数がここに入る
}

Lesson1 Chapter3で学んだこと

  • 状態変数とは、コントラクト内に永遠に保管されるもの。contract{// ここに記述されるのが状態変数}
  • 代表的なデータ型にはuint、int、stringがある
contract Example {
  // このかっこ内がブロックチェーン上に記載される
  uint myUnsignedInteger = 100; //uint: 符号なし整数のデータ型。myUnsignedIntegerに100を格納。
  int mySignedInteger = - 100; //uint: 符号あり整数のデータ型。mySignedIntegerに-100を格納。
  string Iroha = "Nihoheto"; //string: UTF-8文字のデータ型。Irohaに文字列Nihohetoを格納。
}

Lesson1Chapter4で学んだこと

数式演算。Rubyと一緒だな。。。

Lesson1Chapter5で学んだこと

構造体。構造体を使えば、複数のプロパティを持つ複雑なデータ型を作成可能。色々な種類のお互いに関連するデータをまとめて一つの塊にしたもの。この構成要素をメンバーと呼ぶ。

struct Person {
  uint age; //メンバ (プロパティ)
  string name; //メンバ (プロパティ)
}

Lesson1Chapter6~15は少しずつ書いていきます

...続く

Lesson1完了でクリプトゾンビが誕生

CryptozombiLevel1.png

Yukiya025が作ったクリプトゾンビが誕生しました。

6
1
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
6
1