mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #5843 from ethereum/abi-typos
Do not ignore revertOnFailure flag when validating Address/Contract
This commit is contained in:
commit
628d665474
@ -216,7 +216,7 @@ string ABIFunctions::cleanupFunction(Type const& _type, bool _revertOnFailure)
|
||||
switch (_type.category())
|
||||
{
|
||||
case Type::Category::Address:
|
||||
templ("body", "cleaned := " + cleanupFunction(IntegerType(160)) + "(value)");
|
||||
templ("body", "cleaned := " + cleanupFunction(IntegerType(160), _revertOnFailure) + "(value)");
|
||||
break;
|
||||
case Type::Category::Integer:
|
||||
{
|
||||
@ -265,7 +265,7 @@ string ABIFunctions::cleanupFunction(Type const& _type, bool _revertOnFailure)
|
||||
StateMutability::Payable :
|
||||
StateMutability::NonPayable
|
||||
);
|
||||
templ("body", "cleaned := " + cleanupFunction(addressType) + "(value)");
|
||||
templ("body", "cleaned := " + cleanupFunction(addressType, _revertOnFailure) + "(value)");
|
||||
break;
|
||||
}
|
||||
case Type::Category::Enum:
|
||||
@ -341,7 +341,7 @@ string ABIFunctions::conversionFunction(Type const& _from, Type const& _to)
|
||||
solAssert(_from.mobileType(), "");
|
||||
body =
|
||||
Whiskers("converted := <cleanEnum>(<cleanInt>(value))")
|
||||
("cleanEnum", cleanupFunction(_to, false))
|
||||
("cleanEnum", cleanupFunction(_to))
|
||||
// "mobileType()" returns integer type for rational
|
||||
("cleanInt", cleanupFunction(*_from.mobileType()))
|
||||
.render();
|
||||
|
Loading…
Reference in New Issue
Block a user