From 773976728be114bc76ef0ac4d1d3027001e00ef8 Mon Sep 17 00:00:00 2001 From: alvrs Date: Mon, 25 Sep 2023 01:31:15 +0100 Subject: [PATCH] rebuild artifacts --- .../cli/contracts/src/codegen/tables/Dynamics1.sol | 10 +++++----- .../cli/contracts/src/codegen/tables/Singleton.sol | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/cli/contracts/src/codegen/tables/Dynamics1.sol b/packages/cli/contracts/src/codegen/tables/Dynamics1.sol index 5aca919a40..4d40e8f720 100644 --- a/packages/cli/contracts/src/codegen/tables/Dynamics1.sol +++ b/packages/cli/contracts/src/codegen/tables/Dynamics1.sol @@ -1496,7 +1496,7 @@ library Dynamics1 { function toStaticArray_bytes32_1(bytes32[] memory _value) pure returns (bytes32[1] memory _result) { if (_value.length < 1) { - // ignore invalid dynamic arrays that are too small + // return an uninitialized array if the length is smaller than the fixed length to avoid memory corruption return _result; } else { // in memory static arrays are just dynamic arrays without the length byte @@ -1509,7 +1509,7 @@ function toStaticArray_bytes32_1(bytes32[] memory _value) pure returns (bytes32[ function toStaticArray_int32_2(int32[] memory _value) pure returns (int32[2] memory _result) { if (_value.length < 2) { - // ignore invalid dynamic arrays that are too small + // return an uninitialized array if the length is smaller than the fixed length to avoid memory corruption return _result; } else { // in memory static arrays are just dynamic arrays without the length byte @@ -1522,7 +1522,7 @@ function toStaticArray_int32_2(int32[] memory _value) pure returns (int32[2] mem function toStaticArray_uint128_3(uint128[] memory _value) pure returns (uint128[3] memory _result) { if (_value.length < 3) { - // ignore invalid dynamic arrays that are too small + // return an uninitialized array if the length is smaller than the fixed length to avoid memory corruption return _result; } else { // in memory static arrays are just dynamic arrays without the length byte @@ -1535,7 +1535,7 @@ function toStaticArray_uint128_3(uint128[] memory _value) pure returns (uint128[ function toStaticArray_address_4(address[] memory _value) pure returns (address[4] memory _result) { if (_value.length < 4) { - // ignore invalid dynamic arrays that are too small + // return an uninitialized array if the length is smaller than the fixed length to avoid memory corruption return _result; } else { // in memory static arrays are just dynamic arrays without the length byte @@ -1548,7 +1548,7 @@ function toStaticArray_address_4(address[] memory _value) pure returns (address[ function toStaticArray_bool_5(bool[] memory _value) pure returns (bool[5] memory _result) { if (_value.length < 5) { - // ignore invalid dynamic arrays that are too small + // return an uninitialized array if the length is smaller than the fixed length to avoid memory corruption return _result; } else { // in memory static arrays are just dynamic arrays without the length byte diff --git a/packages/cli/contracts/src/codegen/tables/Singleton.sol b/packages/cli/contracts/src/codegen/tables/Singleton.sol index a4c75be211..1d44b0d39c 100644 --- a/packages/cli/contracts/src/codegen/tables/Singleton.sol +++ b/packages/cli/contracts/src/codegen/tables/Singleton.sol @@ -913,7 +913,7 @@ library Singleton { function toStaticArray_uint32_2(uint32[] memory _value) pure returns (uint32[2] memory _result) { if (_value.length < 2) { - // ignore invalid dynamic arrays that are too small + // return an uninitialized array if the length is smaller than the fixed length to avoid memory corruption return _result; } else { // in memory static arrays are just dynamic arrays without the length byte @@ -926,7 +926,7 @@ function toStaticArray_uint32_2(uint32[] memory _value) pure returns (uint32[2] function toStaticArray_uint32_1(uint32[] memory _value) pure returns (uint32[1] memory _result) { if (_value.length < 1) { - // ignore invalid dynamic arrays that are too small + // return an uninitialized array if the length is smaller than the fixed length to avoid memory corruption return _result; } else { // in memory static arrays are just dynamic arrays without the length byte