✨♻️🥢: add FeeVaultSplitter.sol and FeeVaultSplitter.t.sol, update Gasback.sol and Gasback.t.sol - #19
Conversation
There was a problem hiding this comment.
Replicating baseFeeVaultShareNumerator across two contracts feels unclean tho.
I’m imagining a Solidity function triggerBaseFeeVaultWithdraw(uint expectedSelfBalanceAfter) external onlySelf that calls withdraw() on the baseFeeBault.
- and reverts if the
self.balance < expectedSelfBalanceAfter. - and passes if the
self.balance >= expectedSelfBalanceAfter.
This function would then be called in Gasback’s receive() when funds are needed via a pop(call(…, which will make the inner revert silently pass as long as enough gas is given.
Logic in Gasback feels correct. Not sure about logic in the splitter.
Uh oh!
There was an error while loading. Please reload this page.
j6i
commented
Jun 15, 2026
made some updates, lmk what you think |
Uh oh!
There was an error while loading. Please reload this page.
Description
FeeVaultSplitter.sol, used to split incoming sequencer fees from theBaseFeeVaultFeeVaultSplitter.t.solto testFeeVaultSplitter.solGasback.solaccruedcalculationminVaultBalance,accruedRecipient,setAccruedRecipient,withdrawAccruedToAccruedRecipientbaseFeeVaultShareNumerator,setBaseFeeVaultShareNumerator,_expectedBaseFeeVaultShareNumeratorgasbackRatioNumeratorChecklist
Ensure you completed all of the steps below before submitting your pull request:
forge fmt?forge snapshot?forge test?Pull requests with an incomplete checklist will be thrown out.