contract MentalHealthCoin is ERC20, Ownable, ReentrancyGuard {
constructor() ERC20("Mental Health Coin", "MHC") {
_mint(msg.sender, 500000000(10**uint256(decimals())));
}
嗨,有人知道为什么会这样吗?
感谢我试着改变括号,但似乎没有工作。我现在在想这是否与薄荷功能有关
您忘记在500000000后面加上*了
contract MentalHealthCoin is ERC20, Ownable, ReentrancyGuard {
constructor() ERC20("Mental Health Coin", "MHC") {
_mint(msg.sender, 500000000*(10**uint256(decimals())));
}
}