Yul generation of require and assert

This commit is contained in:
Mathias Baumann
2019-05-07 12:19:41 +02:00
parent 442742e497
commit 7f14352bbf
7 changed files with 152 additions and 1 deletions
+4
View File
@@ -62,6 +62,10 @@ public:
/// Pads with zeros and might write more than exactly length.
std::string copyToMemoryFunction(bool _fromCalldata);
// @returns the name of a function that has the equivalent logic of an
// `assert` or `require` call.
std::string requireOrAssertFunction(bool _assert, Type const* _messageType = nullptr);
/// @returns the name of a function that takes a (cleaned) value of the given value type and
/// left-aligns it, usually for use in non-padded encoding.
std::string leftAlignFunction(Type const& _type);