before anything here's some context :
Let's say I'm implementing a dApp, and I want to reduce the number of times users have to call the related smart-contract. In order to do this, all the users' actions are stacked-up, client-side. Eventually, users will have to commit their actions to the smart-contract, in order to update their datas on chain.
The smart-contract takes a queue of all the users' actions as a parameter, and iterate over it to do mainly some checkings and update. A bit like this :
function verifyUsersActions(Queue actions) public
{
while(actions.length != 0)
{
Action currentAction = actions.pop();
/* tests on currentAction, update datas, etc */
}
}
My question is: how does the size of the "actions" object affects gas cost ? What's the increment in gas, between an "actions.length = 2" and an "actions.length = 3" ?
I'm still confused with "memory" and "storage" variables, and don't know in which category does function call parameters fall in.