智能合约源文件基本要素
智能合约源文件基本要素 一个合约(contract)类似于我们面向对象里面所说的类。一个合约中包含状态变量(State Variables),函数(Functions),函数修饰符(Function Modifiers),事件(Events),结构类型(Structs Types)和枚举类型(Enum Types)。 1. 状态变量(State Variables) 变量值会永久存储在合约的存储空间 pragma solidity ^0.5.1; contract hello{ uint value; //state variable } 2.函数(Functions) 智能合约中的
下载地址
用户评论