Improves address literal checksum error message

This commit is contained in:
wadeAlexC
2017-11-17 00:46:44 +00:00
committed by Alex Beregszaszi
parent 2927ce0bd4
commit 8a6692b2cf
6 changed files with 32 additions and 14 deletions
+6
View File
@@ -583,3 +583,9 @@ bool Literal::passesAddressChecksum() const
solAssert(isHexNumber(), "Expected hex number");
return dev::passesAddressChecksum(value(), true);
}
std::string Literal::getChecksummedAddress() const
{
solAssert(isHexNumber(), "Expected hex number");
return dev::getChecksummedAddress(value());
}
+2
View File
@@ -1613,6 +1613,8 @@ public:
bool looksLikeAddress() const;
/// @returns true if it passes the address checksum test.
bool passesAddressChecksum() const;
/// @returns the checksummed version of an address
std::string getChecksummedAddress() const;
private:
Token::Value m_token;