摘要:
solidity 的 构造函数和 java 也是一样的,初始化执行。 contract ConstructorTest { uint256 public price; constructor(uint256 _input){ price = _input; } } 在部署的时候,需要设置值, 不然会 阅读全文
posted @ 2022-04-18 20:13
apeNote
阅读(173)
评论(0)
推荐(0)
摘要:
修饰器,通过定义一个方法,使用该方法去修饰其他方法。 用个没有用修饰器的例子说明,onlyOwner 是一个校验地址是不是原来账号的地址的方法。 将该合约部署 contract Test { address public owner; uint256 public price; constructo 阅读全文
posted @ 2022-04-18 20:03
apeNote
阅读(105)
评论(0)
推荐(0)

浙公网安备 33010602011771号