Merged in changes from chriseth/payable

This commit is contained in:
Alex Beregszaszi
2016-09-05 21:28:28 +02:00
committed by chriseth
parent 680b83b2a4
commit 962531af96
10 changed files with 150 additions and 54 deletions
+17 -14
View File
@@ -1890,20 +1890,23 @@ MemberList::MemberMap FunctionType::nativeMembers(ContractDefinition const*) con
{
MemberList::MemberMap members;
if (m_location != Location::BareDelegateCall && m_location != Location::DelegateCall)
members.push_back(MemberList::Member(
"value",
make_shared<FunctionType>(
parseElementaryTypeVector({"uint"}),
TypePointers{copyAndSetGasOrValue(false, true)},
strings(),
strings(),
Location::SetValue,
false,
nullptr,
m_gasSet,
m_valueSet
)
));
{
if (!m_declaration || m_isPayable) // If this is an actual function, it has to be payable
members.push_back(MemberList::Member(
"value",
make_shared<FunctionType>(
parseElementaryTypeVector({"uint"}),
TypePointers{copyAndSetGasOrValue(false, true)},
strings(),
strings(),
Location::SetValue,
false,
nullptr,
m_gasSet,
m_valueSet
)
));
}
if (m_location != Location::Creation)
members.push_back(MemberList::Member(
"gas",