Hot answers tagged

2

I would suggest reconsidering the design pattern because it isn't mindful of gas. It will not scale and it absolutely will fail when the rows or columns are too large to return. This is persistent information. Clients are welcome to use any caching strategy they wish and will not need more than cells they don't already know about. In any case, they are ...


1

It is caused by this : User storage user=users[0]; You try to assign to user the first element of the users array but you can't access an empty array. If you want to push your object into the array you can use array.push().


1

Storage references will always point to a valid storage slot, even whey they are uninitialized. So something like this IdeaCard storage updatedCard; updatedCard.owner = 0x1234..1234; worked in solc 0.4 and caused overwriting valid storage slots. In solc 0.5 it was turned into an error, but in solc 0.6 it is again a warning. Perhaps Truffle is compiling with ...


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