From 9e6ac55dcc5d1bafc183032ee23c01f795fea604 Mon Sep 17 00:00:00 2001 From: thurendous Date: Sun, 25 Aug 2024 17:35:04 +0900 Subject: [PATCH] more translation in lesson 31 --- Languages/ja/31_ERC20/ERC20.sol | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Languages/ja/31_ERC20/ERC20.sol b/Languages/ja/31_ERC20/ERC20.sol index dd40015cb..9c1757ebe 100644 --- a/Languages/ja/31_ERC20/ERC20.sol +++ b/Languages/ja/31_ERC20/ERC20.sol @@ -17,13 +17,13 @@ contract ERC20 is IERC20 { uint8 public decimals = 18; // トークンの小数点以下桁数 - // @dev 在合约部署的时候实现合约名称和符号 + // @dev deploy時に実行されるコンストラクタ constructor(string memory name_, string memory symbol_) { name = name_; symbol = symbol_; } - // @dev 实现`transfer`函数,代币转账逻辑 + // @dev `transfer`関数を実装。トークン転送ロジック function transfer(address recipient, uint256 amount) public override returns (bool) { balanceOf[msg.sender] -= amount; balanceOf[recipient] += amount; @@ -31,14 +31,14 @@ contract ERC20 is IERC20 { return true; } - // @dev 实现 `approve` 函数, 代币授权逻辑 + // @dev `approve` 関数を実装。トークン権限委任ロジック function approve(address spender, uint256 amount) public override returns (bool) { allowance[msg.sender][spender] = amount; emit Approval(msg.sender, spender, amount); return true; } - // @dev 实现`transferFrom`函数,代币授权转账逻辑 + // @dev `transferFrom`関数の実装。トークン転送ロジック function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { allowance[sender][msg.sender] -= amount; balanceOf[sender] -= amount; @@ -47,14 +47,14 @@ contract ERC20 is IERC20 { return true; } - // @dev 铸造代币,从 `0` 地址转账给 调用者地址 + // @dev トークンのミント。`0`アドレスから、callerアドレスへトークンを転送 function mint(uint256 amount) external { balanceOf[msg.sender] += amount; totalSupply += amount; emit Transfer(address(0), msg.sender, amount); } - // @dev 销毁代币,从 调用者地址 转账给 `0` 地址 + // @dev トークンを焼却,callerから`amount`数量のトークンを`0`アドレスへ転送 function burn(uint256 amount) external { balanceOf[msg.sender] -= amount; totalSupply -= amount;