✨♻️🥢: add FeeVaultSplitter.sol and FeeVaultSplitter.t.sol, update Gasback.sol and Gasback.t.sol#19
✨♻️🥢: add FeeVaultSplitter.sol and FeeVaultSplitter.t.sol, update Gasback.sol and Gasback.t.sol#19j6i wants to merge 5 commits into
FeeVaultSplitter.sol and FeeVaultSplitter.t.sol, update Gasback.sol and Gasback.t.sol#19Conversation
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.
made some updates, lmk what you think |
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.