Skip to content

fix: route missing FixedMaturity selectors and unblock deploy scripts - #17

Merged
stefanobotticelli merged 1 commit into
mainfrom
kpi4/multichain-deploy-scripts
Aug 21, 2026
Merged

fix: route missing FixedMaturity selectors and unblock deploy scripts#17
stefanobotticelli merged 1 commit into
mainfrom
kpi4/multichain-deploy-scripts

Conversation

@kalrashivam

Copy link
Copy Markdown
Collaborator

Summary

  • 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. SelectorRegistry.sol's
    independently-hardcoded guardrail copy had the same gap and is now back in sync.
  • foundry.toml had no fs_permissions write access anywhere, so _writeAddressBook()'s
    vm.writeJson() reverted at the last line of every deploy script, OE and FM alike. Grants
    read-write on ./broadcast.
  • DeployFixedMaturityVault.s.sol's _seedDeadDeposit() never approved the vault before
    calling seedDeadDeposit(), unlike the OE script — fixed.
  • Brings the remaining 5 standalone deploy scripts (DeployBufferManager,
    DeployFixedMaturityVaultUpkeep, DeployQueueModule, DeployStrategyRouter,
    DeployVaultUpkeep) onto ChainConfig for consistency with the rest of script/
    (merged in feat: add parametrized ChainConfig for Arbitrum/Base/Ethereum deploys #16 / 041710c).

Test plan

  • forge build — clean, no errors
  • forge test — 946/946 passing
  • DeployCoreSystem.s.sol dry-run against a live Arbitrum fork (real Aave/Chainlink/USDC,
    funded deployer) — reaches SIMULATION COMPLETE, zero reverts
  • DeployFixedMaturityVault.s.sol dry-run against the same fork — reaches
    SIMULATION COMPLETE, zero reverts
  • Operator: re-verify ChainConfig.sol addresses independently before any real mainnet deploy

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
stefanobotticelli merged commit ec63ccc into main Aug 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants