Open TechnoGecko opened 2 years ago
This is from Week 1's code, by the way
thanks for your comments Cody!
In this segment, we are just reading the array proposals from the blockchain in the script, so until I know there is no gas cost for this operation.
Oh! You're right, that's just the public getter. Nice 👍
Would it be better to rewrite the ballotContract.proposals function in the contract to do this looping so it only has to write to storage once? It seems like calling this function an indeterminate amount of times could get expensive or lead to us hitting the gas limit