Francisco Giordano
Francisco Giordano
I support something _like this_, but `returnAndIncrement` is a confusing name, as "returning" is always the last thing done in a function. We should brainstorm other options. What about `getCurrentAndIncrement`...
A way to sidestep this issue would be to return both pre and post values from the function: ```solidity function increment(Counter storage counter) returns (uint previousValue, uint currentValue); ``` Although...
What if we named the return values `(previousValue, nextValue)`?
I'm ok with creating separate functions, we just need good names for them. I don't think the alternatives proposed so far are good enough. Maybe we should just go with...
> maybe `getAndIncrement`, `incrementAndGet`, `getAndDecrement`, `decrementAndGet`. Let's go with this. Feel free to submit a PR.
@GVTopCoder How can I reach out to you to discuss and understand this better?
@z0r0z I see that Baal has implemented this by defining `getPriorVotes(address account, uint256 timeStamp)`. In our case we have concerns with this simple approach because it leads to a possible...
Closing for reasons explained in https://github.com/OpenZeppelin/openzeppelin-contracts/issues/3062#issuecomment-1033177430.
@burke-md Yes that sounds good!
Feel free to submit a pull request with this change to ERC1155Supply. Note that the code submitted by @philipSKYBIT above is suboptimal because the global supply is updated once for...