基本信息
文件名称:区块链原理与应用——数字经济的视角 课件3-1.编写合约.pptx
文件大小:123.1 KB
总页数:8 页
更新时间:2025-08-30
总字数:约5.88千字
文档摘要

开始编写合约 前面介绍MetaMask和Remix使用时,我们了解了如何编译部署Solidity智能合约。现在我们开始进入从代码逐步学习Solidity。先来看看我们的第一个合约。第一个合约:Counter//SPDX-License-Identifier:MITpragmasolidity=0.8.0;//定义一个合约contractCounter{uintpubliccounter;constructor(){counter=0;}functioncount()public{counter=counter+1;}funct