摘要: // SPDX-License-Identifier: GPL-3.0//通过合约部署合约,通过代理合约去部署, pragma solidity ^0.8.3; contract TestContract1 { address public owner = msg.sender; function 阅读全文
posted @ 2022-07-29 18:39 ZaleSwfit 阅读(146) 评论(0) 推荐(0) 编辑
摘要: // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.3; contract Enum { enum Status {//枚举和结构体都是一种类型 None, Pending, Shipped, Completed, Rejected, C 阅读全文
posted @ 2022-07-29 17:26 ZaleSwfit 阅读(80) 评论(0) 推荐(0) 编辑
摘要: // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.3; contract Structs {//结构体是能够将多种变量格式打包一起的数据格式,以一种类型的形式存在 struct Car { string model;//默认值字符串 u 阅读全文
posted @ 2022-07-29 16:01 ZaleSwfit 阅读(101) 评论(0) 推荐(0) 编辑
摘要: // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.7; contract IterableMapping { mapping(address => uint) public balances;//地址对应余额映射 mapping(add 阅读全文
posted @ 2022-07-29 12:27 ZaleSwfit 阅读(47) 评论(0) 推荐(0) 编辑