mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add abi.encode, abi.encodePacked, abi.encodeWithSelector and abi.encodeWithSignature.
This commit is contained in:
committed by
chriseth
parent
ee5d0ef79b
commit
d56acb68ab
@@ -914,6 +914,10 @@ public:
|
||||
ObjectCreation, ///< array creation using new
|
||||
Assert, ///< assert()
|
||||
Require, ///< require()
|
||||
ABIEncode,
|
||||
ABIEncodePacked,
|
||||
ABIEncodeWithSelector,
|
||||
ABIEncodeWithSignature,
|
||||
GasLeft ///< gasleft()
|
||||
};
|
||||
|
||||
@@ -1049,7 +1053,7 @@ public:
|
||||
ASTPointer<ASTString> documentation() const;
|
||||
|
||||
/// true iff arguments are to be padded to multiples of 32 bytes for external calls
|
||||
bool padArguments() const { return !(m_kind == Kind::SHA3 || m_kind == Kind::SHA256 || m_kind == Kind::RIPEMD160); }
|
||||
bool padArguments() const { return !(m_kind == Kind::SHA3 || m_kind == Kind::SHA256 || m_kind == Kind::RIPEMD160 || m_kind == Kind::ABIEncodePacked); }
|
||||
bool takesArbitraryParameters() const { return m_arbitraryParameters; }
|
||||
bool gasSet() const { return m_gasSet; }
|
||||
bool valueSet() const { return m_valueSet; }
|
||||
@@ -1207,7 +1211,7 @@ private:
|
||||
class MagicType: public Type
|
||||
{
|
||||
public:
|
||||
enum class Kind { Block, Message, Transaction };
|
||||
enum class Kind { Block, Message, Transaction, ABI };
|
||||
virtual Category category() const override { return Category::Magic; }
|
||||
|
||||
explicit MagicType(Kind _kind): m_kind(_kind) {}
|
||||
|
||||
Reference in New Issue
Block a user