Conversation
| s_balanceOf[owner].unbonding += _amt; | ||
|
|
||
| emit Unbond(owner, amount, block.number + ESCROW_DURATION + 1); | ||
| emit Unbond(owner, amount, SafeBlockNumber.get() + ESCROW_DURATION + 1); |
There was a problem hiding this comment.
We should probably cache the block number in a local var if used more than once in a function. Looks like thats done in the other files but not here. Any reason not to here?
There was a problem hiding this comment.
I will work on a PR for the transient storage idea which and add a caches here as well
|
Seeing as this call to the Arbitrum I think we'd have to change it from a library to an internal function, maybe in We would keep the Wdyt? EDIT: This isn't urgent. In its current state, Atlas is a deployable size (as of #445), and the gas diffs shouldn't be significant on L2s like Arbitrum. |
|
I think this PR + changes in #445 are good for an official Arbitrum release. We should probably keep this version living on a separate parallel branch to The one piece from this PR + #445 we should bring back to |
I really like this idea because we accessing the block number quite a few time during accounting stage |
This change introduces a new library
SafeBlockNumber