Add isDynamicallyEncoded member function to types.

This commit is contained in:
chriseth
2017-08-09 23:18:42 +01:00
committed by Alex Beregszaszi
parent 279e64ae75
commit b38f31617e
2 changed files with 16 additions and 1 deletions
+10
View File
@@ -1408,6 +1408,11 @@ unsigned ArrayType::calldataEncodedSize(bool _padded) const
return unsigned(size);
}
bool ArrayType::isDynamicallyEncoded() const
{
return isDynamicallySized() || baseType()->isDynamicallyEncoded();
}
u256 ArrayType::storageSize() const
{
if (isDynamicallySized())
@@ -1710,6 +1715,11 @@ unsigned StructType::calldataEncodedSize(bool _padded) const
return size;
}
bool StructType::isDynamicallyEncoded() const
{
solAssert(false, "Structs are not yet supported in the ABI.");
}
u256 StructType::memorySize() const
{
u256 size;