学习Solidity记录-4-给前面的代币加税
Blog icon太阳战士
Jun 27
1,代码:// SPDX-License-Identifier: MIT pragma solidity ^0.8.10; contract ERC20 { uint public totalSupply = 100000000000000000000; //18个小数点,总量100个 mapping(address => uint) public balanceOf; //map映射保存所有代币余额,所有账户的币都在这里记着 //map类似python的字典 string public name = "wangzai"; //代币的名称 string public symbol = "xiaomantou"; //代币的符号 uint8 public decimals = 18; //代币的小数点数 event Transfer(address indexed from, address indexed to, uint value); //事件,发送交易的时间,事件可以被其他客户端监控,让客户端知道事件发生 //////////////////////////////////...

Most popular by 太阳战士

学习Solidity记录-1-简单存储合约

学习Solidity记录-1-简单存储合约

太阳战士

Written by
太阳战士

long may the sun shine!

Subscribe

2025 Paragraph Technologies Inc

PopularTrendingPrivacyTermsHome
Search...Ctrl+K

太阳战士

Subscribe