Refactor abi encoding functions to prepare implementing calldata arrays and structs.

This commit is contained in:
Daniel Kirchner
2019-04-04 11:18:03 +02:00
parent b0cb330397
commit d82157d46a
3 changed files with 120 additions and 94 deletions
+3 -3
View File
@@ -79,11 +79,11 @@ public:
/// The function reverts for too large lengths.
std::string arrayAllocationSizeFunction(ArrayType const& _type);
/// @returns the name of a function that converts a storage slot number
/// or a memory pointer to the slot number / memory pointer for the data position of an array
/// which is stored in that slot / memory area.
/// a memory pointer or a calldata pointer to the slot number / memory pointer / calldata pointer
/// for the data position of an array which is stored in that slot / memory area / calldata area.
std::string arrayDataAreaFunction(ArrayType const& _type);
/// @returns the name of a function that advances an array data pointer to the next element.
/// Only works for memory arrays and storage arrays that store one item per slot.
/// Only works for memory arrays, calldata arrays and storage arrays that store one item per slot.
std::string nextArrayElementFunction(ArrayType const& _type);
/// @returns the name of a function that allocates memory.