Created
January 30, 2020 03:38
-
-
Save hydai/c38d68a9efc1dc43e02d1883c1dbea4a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./solc/solc --ir ~/workspace/soll/test/solidity/stringCompare.sol | |
Unimplemented feature: | |
/solidity/libsolidity/codegen/YulUtilFunctions.cpp(1077): Throw in function solidity::frontend::YulUtilFunctions::updateStorageValueFunction(const solidity::frontend::Type&, const std::optional<unsigned int>&)::<lambda()> | |
Dynamic exception type: boost::exception_detail::clone_impl<solidity::langutil::UnimplementedFeatureError> | |
std::exception::what: | |
[solidity::util::tag_comment*] = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.6.0; | |
contract Service { | |
mapping(string => string) accounts; | |
// test: acc="abc", pw="123" | |
function createAccount(string memory acc, string memory pw) public { | |
accounts[acc] = pw; | |
} | |
// test: acc="abc", pw="1"; get false | |
// test: acc="abc", pw="123"; get true | |
function checkLogin(string memory acc, string memory pw) public view returns (bool) { | |
if (keccak256(bytes(accounts[acc])) == keccak256(bytes(pw))) | |
return true; | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment