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())
|
switch (_type.category())
|
||||||
{
|
{
|
||||||
case Type::Category::Address:
|
case Type::Category::Address:
|
||||||
templ("body", "cleaned := " + cleanupFunction(IntegerType(160)) + "(value)");
|
templ("body", "cleaned := " + cleanupFunction(IntegerType(160), _revertOnFailure) + "(value)");
|
||||||
break;
|
break;
|
||||||
case Type::Category::Integer:
|
case Type::Category::Integer:
|
||||||
{
|
{
|
||||||
@ -265,7 +265,7 @@ string ABIFunctions::cleanupFunction(Type const& _type, bool _revertOnFailure)
|
|||||||
StateMutability::Payable :
|
StateMutability::Payable :
|
||||||
StateMutability::NonPayable
|
StateMutability::NonPayable
|
||||||
);
|
);
|
||||||
templ("body", "cleaned := " + cleanupFunction(addressType) + "(value)");
|
templ("body", "cleaned := " + cleanupFunction(addressType, _revertOnFailure) + "(value)");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case Type::Category::Enum:
|
case Type::Category::Enum:
|
||||||
@ -341,7 +341,7 @@ string ABIFunctions::conversionFunction(Type const& _from, Type const& _to)
|
|||||||
solAssert(_from.mobileType(), "");
|
solAssert(_from.mobileType(), "");
|
||||||
body =
|
body =
|
||||||
Whiskers("converted := <cleanEnum>(<cleanInt>(value))")
|
Whiskers("converted := <cleanEnum>(<cleanInt>(value))")
|
||||||
("cleanEnum", cleanupFunction(_to, false))
|
("cleanEnum", cleanupFunction(_to))
|
||||||
// "mobileType()" returns integer type for rational
|
// "mobileType()" returns integer type for rational
|
||||||
("cleanInt", cleanupFunction(*_from.mobileType()))
|
("cleanInt", cleanupFunction(*_from.mobileType()))
|
||||||
.render();
|
.render();
|
||||||
|
Loading…
Reference in New Issue
Block a user