2

You must use array.length-- in order to accurately persist the length of the array. The confusion comes from the fact that delete in Solidity does not actually delete an element from an array, but rather it just sets the element to it's default value (0 for a uint256, for example). Observe the following code as an example: uint256[] public testArray = [1,2,3,...


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

You're overlooking the mining step. Contract deployment is the result of a transaction, but first a transaction has to mine. In the interim, the first response from sending a transaction, which new DepositPaying(address(this)) does, is a transaction hash. That response doesn't indicate that the transaction is processed. Only that it was sent and assigned a ...


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().


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