fix: route missing FixedMaturity selectors and unblock deploy scripts - #17
Merged
Merged
Conversation
SelectorLib.getFixedMaturityModuleSelectors() only routed 14 of IFixedMaturityModule's 17 functions through CoreVault. The 9 missing selectors (fundingDeadlineTs, maturityTs, minFundingAssets, fixedTermStrategy, netFundedAssets, isFundingSuccessful, isFundingTargetReached, isInstantExitOpen, finalPerformanceFeeStatus) are exactly what FixedMaturityVaultUpkeep calls through the vault proxy to drive the FM lifecycle -- the keeper was non-functional on any real FM deployment. Add the same entries to SelectorRegistry.sol, the independently-hardcoded guardrail copy that had drifted out of sync. Also fixes two deploy-script blockers found by dry-running both flows against a live Arbitrum fork: - foundry.toml had no fs_permissions write access anywhere, so _writeAddressBook()'s vm.writeJson() reverted at the last line of every script, OE and FM alike. Grant read-write on ./broadcast. - DeployFixedMaturityVault.s.sol's _seedDeadDeposit() never approved the vault before calling seedDeadDeposit(), unlike the OE script. Bring the remaining 5 standalone deploy scripts (DeployBufferManager, DeployFixedMaturityVaultUpkeep, DeployQueueModule, DeployStrategyRouter, DeployVaultUpkeep) onto ChainConfig for consistency with the rest of script/ merged in 041710c. Verified: both DeployCoreSystem and DeployFixedMaturityVault reach SIMULATION COMPLETE against a live Arbitrum fork with zero reverts; full 946-test suite green.
stefanobotticelli
approved these changes
Aug 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SelectorLib.getFixedMaturityModuleSelectors()only routed 14 ofIFixedMaturityModule's17 functions through
CoreVault. The 9 missing selectors (fundingDeadlineTs,maturityTs,minFundingAssets,fixedTermStrategy,netFundedAssets,isFundingSuccessful,isFundingTargetReached,isInstantExitOpen,finalPerformanceFeeStatus) are exactly whatFixedMaturityVaultUpkeepcalls through the vault proxy to drive the FM lifecycle — thekeeper was non-functional on any real FM deployment.
SelectorRegistry.sol'sindependently-hardcoded guardrail copy had the same gap and is now back in sync.
foundry.tomlhad nofs_permissionswrite access anywhere, so_writeAddressBook()'svm.writeJson()reverted at the last line of every deploy script, OE and FM alike. Grantsread-writeon./broadcast.DeployFixedMaturityVault.s.sol's_seedDeadDeposit()never approved the vault beforecalling
seedDeadDeposit(), unlike the OE script — fixed.DeployBufferManager,DeployFixedMaturityVaultUpkeep,DeployQueueModule,DeployStrategyRouter,DeployVaultUpkeep) ontoChainConfigfor consistency with the rest ofscript/(merged in feat: add parametrized ChainConfig for Arbitrum/Base/Ethereum deploys #16 /
041710c).Test plan
forge build— clean, no errorsforge test— 946/946 passingDeployCoreSystem.s.soldry-run against a live Arbitrum fork (real Aave/Chainlink/USDC,funded deployer) — reaches
SIMULATION COMPLETE, zero revertsDeployFixedMaturityVault.s.soldry-run against the same fork — reachesSIMULATION COMPLETE, zero revertsChainConfig.soladdresses independently before any real mainnet deploy