Skip to content

Commit

Permalink
make Lecture08 readme source code comments japanese and some modifica…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
PolymetisOutis committed Jul 28, 2024
1 parent 68fdfaf commit 3d535a4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Languages/ja/09_Constant_ja/Constant.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
pragma solidity ^0.8.21;
contract Constant {
// The constant variable must be initialized when declared and cannot be changed after that
// constant変数は宣言時に初期化され、その後で変更することは出来ない
//constant変数は宣言時に初期化され、その後で変更することは出来ない
uint256 public constant CONSTANT_NUM = 10;
string public constant CONSTANT_STRING = "0xAA";
bytes public constant CONSTANT_BYTES = "WTF";
address public constant CONSTANT_ADDRESS = 0x0000000000000000000000000000000000000000;

// The immutable variable can be initialized in the constructor and cannot be changed after that
// immutable変数はコントラクターにおいて初期化され、その後で変更することは出来ない
//immutable変数はコントラクターにおいて初期化され、その後で変更することは出来ない
uint256 public immutable IMMUTABLE_NUM = 9999999999;
address public immutable IMMUTABLE_ADDRESS;
uint256 public immutable IMMUTABLE_BLOCK;
uint256 public immutable IMMUTABLE_TEST;

// The immutable variables are initialized with constructor, so that could use
// immutable変数はコンストラクターを用いて初期化されるので、次のようにすることが出来る
//immutable変数はコンストラクターを用いて初期化されるので、次のようにすることが出来る
constructor(){
IMMUTABLE_ADDRESS = address(this);
IMMUTABLE_BLOCK = block.number;
Expand Down
3 changes: 3 additions & 0 deletions Languages/ja/09_Constant_ja/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

``` solidity
// The constant variable must be initialized when declared and cannot be changed after that
//(constant変数は宣言時に初期化され、その後で変更することは出来ない)
uint256 constant CONSTANT_NUM = 10;
string constant CONSTANT_STRING = "0xAA";
bytes constant CONSTANT_BYTES = "WTF";
Expand All @@ -34,6 +35,7 @@

``` solidity
// The immutable variable can be initialized in the constructor and cannot be changed later
//(immutable変数はコントラクターにおいて初期化され、その後で変更することは出来ない)
uint256 public immutable IMMUTABLE_NUM = 9999999999;
address public immutable IMMUTABLE_ADDRESS;
uint256 public immutable IMMUTABLE_BLOCK;
Expand All @@ -44,6 +46,7 @@

``` solidity
// The immutable variables are initialized with the constructor, that is:
//(immutable変数はコンストラクターを用いて初期化されるので、次のようにすることが出来る)
constructor(){
IMMUTABLE_ADDRESS = address(this);
IMMUTABLE_BLOCK = block.number;
Expand Down

0 comments on commit 3d535a4

Please sign in to comment.