feat: bring multichain launch entry points to Base parity - #23
Open
0xCaps wants to merge 1 commit into
Open
Conversation
The multichain zap client implemented only flaunch and flaunchWithDynamicSplitManager. Every other launch entry point on FlaunchSDK routed unconditionally to readWriteFlaunchZap, which is never constructed for a multichain deployment, so callers got "readWriteFlaunchZap is not supported on chain 4663" instead of a launch. flaunch() additionally threw outright on any treasuryManagerParams. The zap contract has supported this all along: it exposes flaunch/2 and flaunch/3, and flaunchWithDynamicSplitManager already writes the three-argument form. Only the client surface was missing. Adds flaunchIPFS, flaunchWithRevenueManager, flaunchIPFSWithRevenueManager, flaunchWithSplitManager, flaunchIPFSWithSplitManager and flaunchIPFSWithDynamicSplitManager to the multichain client, and dispatches all seven entry points on isMultichainDeployment so the public API behaves the same on every chain. Encoding is copied from the base client rather than reinvented, including the static-split remainder fold, so behaviour is identical. flaunch() now selects the overload by manager presence. This matters: the two-argument overload would still produce a valid transaction that silently drops the manager and routes fees to the default treasury, so the tests assert argument count and manager params directly. Verified read-only against the live Robinhood zap: launching into two real manager instances found in factory ManagerDeployed logs simulates successfully and returns the existing instance as deployedManager_, confirming the zap deposits rather than redeploying. Two tests asserted the old limitation and now assert parity instead. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
The missing piece
ReadWriteFlaunchZapMultichainimplements 2 methods. The base zap client implements 11. Everything else onFlaunchSDKroutes unconditionally toreadWriteFlaunchZap, which is never constructed for a multichain deployment — so on Robinhood you get an internal-sounding error instead of a launch:Separately, multichain
flaunch()threw outright on anytreasuryManagerParams.The contract has supported this the whole time.
FlaunchZapexposesflaunch/2andflaunch/3, andflaunchWithDynamicSplitManageralready writes the three-argument form. Only the client surface was missing.What this changes
Added to the multichain client, encoding copied from the base client rather than reinvented:
flaunch(with manager)flaunch/3flaunchWithRevenueManagerflaunchIPFSWithRevenueManagerflaunchWithSplitManagerflaunchIPFSWithSplitManagerflaunchIPFSflaunchIPFSWithDynamicSplitManagerAll seven now dispatch on
isMultichainDeployment, matching howflaunchandflaunchWithDynamicSplitManageralready worked. The entry point is parity regardless of which position-manager version sits underneath — callers stop needing per-chain capability tables.Why the overload selection is load-bearing
flaunch()picks the overload by manager presence. Getting this wrong does not throw: the two-argument overload produces a valid transaction that silently drops the manager and routes fees to the default treasury. The tests therefore assert argument count and manager params directly rather than just "it didn't revert".Verification
flaunch/2, across all three multichain deployments.ManagerDeployedlogs on the factory,eth_callsucceeds and returns the existing instance asdeployedManager_— confirming the zap deposits into it rather than redeploying:deployedManager_0xBa824C9a…0xBa824C9a…✅0xfed0044A…0xfed0044A…✅Two tests changed
factoryAndGuardsassertedflaunchIPFSWithDynamicSplitManageris base-only, andmultichainLaunchasserted treasury managers reject. Both encoded the limitation being lifted.Notes for review
total - recipients - owner, without subtracting the creator split, so a 20% creator split with 80% recipients yields 40%. Copied verbatim from the base client for parity; flagging it since it looks unintentional and may deserve a separate fix on both paths.deployRevenueManager/deployStakingManager/deployBuyBackManager. Those needreadWriteTreasuryManagerFactory, which is also unconstructed on multichain. The factory is deployed at 4663 with all three implementations approved, so it is a viable follow-up — kept out to keep this diff to launch entry points../addressesand./utilsdeclare CJS entry points (dist/addresses.cjs,dist/utils/index.cjs) that don't exist in the published tarball, sorequirethrows while types resolve. Consumers have to import everything from the package root.Downstream
flaunch-web2-api currently calls the zap directly to work around this (#60). Once this ships, that bypass gets deleted in favour of
flaunchWithRevenueManager. peripheral-gtm hardcodeschainSupportsRevenueManager() === "base"and can drop that too.🤖 Generated with Claude Code