1、注意事项 1
合约版本报错问题
contract.sol:15:6: Warning: Dening constructors as funcons with the same name as the
contract is deprecated. Use "constructor(...) { ... }" instead.
funcon Register() public {
^ (Relevant source part starts here and spans across mulple lines).
funcon Register() public {
} owner = msg.sender;
-----》修改成
constructor() public {
owner = msg.sender;
}
就可以了
keccak256 件问题
Warning: This funcon only accepts a single "bytes" argument. Please use
"abi.encodePacked(...)" or a similar funcon to encode the data.
return userPool[username].password == keccak256(password);
keccak256(password) -->修改成
keccak256(abi.encodePacked(password));
就可以了
评论0