个人博客:sulenn
出错:粘贴https://www.ethereum.org/token#the-code中代码至Ethereum Wallet时报错
Could not compile source code.
Defining constructors as functions with the same name as the contract is deprecated. Use "constructor(...) { ... }" instead.
function TokenERC20(
^ (Relevant source part starts here and spans across multiple lines).
出错原因:solidity版本更新,其中合约中构造函数定义的方法发生了变化,具体可参考https://solidity.readthedocs.io/en/v0.4.24/contracts.html#creating-contracts
修改:将代码中function TokenERC20改成constructor即可
以太坊模拟发行代币可参考:https://www.jianshu.com/p/410198814516和https://ethfans.org/topics/118
模拟代币发行对网络有一定要求
解决在EthereumWallet中因Solidity版本更新导致的构造函数定义错误,将functionTokenERC20改为constructor即可。涉及以太坊合约部署及代币发行。
8625

被折叠的 条评论
为什么被折叠?



