【发布时间】:2019-06-03 17:25:46
【问题描述】:
为什么我不能在 Solidity 0.5.0 中以这种方式声明常量?使用最新版本一切正常:
uint256 public constant INITIAL_SUPPLY = 10000 * (10 ** uint256(decimals()));
/**
* @return the number of decimals of the token.
*/
function decimals() public view returns (uint8) {
return _decimals;
}
【问题讨论】: