事件 在定义事件的时候,前三个参数可以定义为indexed,方便在区块链里面扫描查找,indexed的参数会存储在topics下面immutable (不可变量)与constant(常量)Solidity 0.6.5 更新引入了一个新的关键字 immutable constant 修饰的变量需要在编译期确定值, 链上不会为这个变量分配存储空间, 它会在编译时用具体的值替代, 因此, constant常量是不支持使用运行时状态赋值的(例如: block.number , now , msg.sender 等 )。constant 目前仅支持修饰 strings 及 值类型. immutable 修饰的变量是在部署的时候确定变量的值, 所以写在构造函数中。它在构造函数中赋值一次之后,就不在改变, 这是一个运行时赋值, 就可以解除之前 constant 不支持使用运行时状态赋值的限制.Solidity 0.6.x更新继承contract Part1 { constructor() public {} } contract Part2 { constructor() public {} ...