mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Implement typechecked abi.encodeCall()
This commit is contained in:
@@ -2935,6 +2935,7 @@ string FunctionType::richIdentifier() const
|
||||
case Kind::ABIEncode: id += "abiencode"; break;
|
||||
case Kind::ABIEncodePacked: id += "abiencodepacked"; break;
|
||||
case Kind::ABIEncodeWithSelector: id += "abiencodewithselector"; break;
|
||||
case Kind::ABIEncodeCall: id += "abiencodecall"; break;
|
||||
case Kind::ABIEncodeWithSignature: id += "abiencodewithsignature"; break;
|
||||
case Kind::ABIDecode: id += "abidecode"; break;
|
||||
case Kind::MetaType: id += "metatype"; break;
|
||||
@@ -3499,6 +3500,7 @@ bool FunctionType::isPure() const
|
||||
m_kind == Kind::ABIEncode ||
|
||||
m_kind == Kind::ABIEncodePacked ||
|
||||
m_kind == Kind::ABIEncodeWithSelector ||
|
||||
m_kind == Kind::ABIEncodeCall ||
|
||||
m_kind == Kind::ABIEncodeWithSignature ||
|
||||
m_kind == Kind::ABIDecode ||
|
||||
m_kind == Kind::MetaType ||
|
||||
@@ -4001,6 +4003,15 @@ MemberList::MemberMap MagicType::nativeMembers(ASTNode const*) const
|
||||
true,
|
||||
StateMutability::Pure
|
||||
)},
|
||||
{"encodeCall", TypeProvider::function(
|
||||
TypePointers{},
|
||||
TypePointers{TypeProvider::array(DataLocation::Memory)},
|
||||
strings{},
|
||||
strings{1, ""},
|
||||
FunctionType::Kind::ABIEncodeCall,
|
||||
true,
|
||||
StateMutability::Pure
|
||||
)},
|
||||
{"encodeWithSignature", TypeProvider::function(
|
||||
TypePointers{TypeProvider::array(DataLocation::Memory, true)},
|
||||
TypePointers{TypeProvider::array(DataLocation::Memory)},
|
||||
|
||||
Reference in New Issue
Block a user