Hot answers tagged

1

If you pass as a parameter or receive from a function a value of non-canonical type, such as a string or an array, then the offset of its description is passed in the position of the corresponding parameter or return value. Accordingly, for two bytse32 arrays it will be (array1[2], array2[3]): 000 ...


1

Solidity creates getter functions for public state variables automatically. For example, the following will work: contract A { uint256 public foo = 1; } contract B { A a; function getFoo() public view returns (uint256) { return a.foo(); } } In the case of arrays however, you can only get a single element from the array, rather than the entire ...


Only top voted, non community-wiki answers of a minimum length are eligible