New answers tagged

1

It really depends on the way you implement it. EVM allocates you new memory slots in 256 bit chunks and in order that the state variables are declared. So if you declare them like that: uint32 time; uint256 money; uint32 anotherTime; these variables will take up 3 slots of 256 bit: time will create a first 256 bit slot and take 32 bit in it, money will not ...


1

I suggest you change the way you built your uint256[13] to use uint256[] memory _value = new uint256[](13); instead. Then you should be able to use myFunc(_value). If your array does not always contain 13 elements, you can replace 13 with a variable, like so: uint256 _n = 3; uint256[] memory _value = new uint256[](_n); // populate your array


Top 50 recent answers are included