【发布时间】:2018-06-14 06:01:06
【问题描述】:
好的。所以我知道这应该很容易做到,我只想在下面设置一个默认值:
uint8 public gasPriceLimit; //Gas Price Limit
//Constructor
constructor(string _name, string _symbol, uint8 _decimals) public {
name = _name;
symbol = _symbol;
decimals = _decimals;
uint8 gasPriceLimit = 999;
}
但是,这样做我在编译时收到以下错误:
Type int_const 999 is not implicitly convertible to expected type uint8.
我也尝试在声明本身中设置,但没有运气。
干杯
【问题讨论】:
标签: solidity