Migrate to the BWLK redeployment (v1.0.0)#8
Conversation
Align the SDK with the redeployed Boardwalk contracts. Breaking release: - Chains are now Ethereum (1), Base (8453), Arbitrum (42161), and Robinhood Chain (4663); Fraxtal/Katana/Ink removed. viem bumped to ^2.55.2 for the robinhood chain definition. - BMX -> BWLK everywhere: stake-bwlk/unstake-bwlk commands, bwlkToken registry key, bwlkBurnCost meta, approve-bwlk step ids. - Governance re-homed to Ethereum: weekly revenue votes (options 1-4), sbfBWLK weight, new OptionIneligible pre-check; staking, handle-rewards, and participation claims are Ethereum-only via the Morphex RewardRouterV5 stack. - Raise token is canonical WETH on every chain; graduation is 5 WETH on both paths. - DEX is the chain's canonical Uniswap V2. Swaps now use swapExactTokensForTokensSupportingFeeOnTransferTokens with a tax-adjusted quote (launch tokens are fee-on-transfer; the plain variant reverts on sells and skips the tax on buys' min-out). - member-discount now mirrors the contract's rounding exactly (base - base*bps/10000); the old form could under-approve by 1 wei. - Core ABIs regenerated from fresh forge artifacts; RewardRouter ABI taken from morphex-contracts RewardRouterV5. IntegratorFeeCollector quote now returns (0,0) when nothing is claimable - CLI branches on it instead of expecting a revert. - Launch config enforces the contract's 4-fee/5-vesting recipient caps client-side. - Registry addresses are zero placeholders until the deployment lands; canonical Uniswap V2 + WETH addresses are filled. - Docs (README, SKILL.md, plugin, CLAUDE.md, AGENTS.md) rewritten for the new facts; smoke.mjs split into Base + Ethereum legs (BOARDWALK_ETH_RPC).
PR SummaryHigh Risk Overview The platform token and CLI surface rename BMX → BWLK ( Supported chains become Ethereum, Base, Arbitrum, and Robinhood Chain; Fraxtal, Katana, and Ink are dropped. viem is bumped to Swaps and LP target each chain’s canonical Uniswap V2 (not a Boardwalk-specific DEX). Smaller correctness fixes: member discount rounding matches the contract (avoids 1-wei under-approve), launch config enforces 4 fee / 5 vesting recipient caps, and integrator fee quoting handles empty claimables. smoke.mjs runs Base app commands plus an Ethereum leg ( Reviewed by Cursor Bugbot for commit bb92e68. Configure here. |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe SDK and CLI transition from BMX/Base-oriented behavior to BWLK staking and governance on Ethereum, while launch, liquidity, swap, and visibility flows support Ethereum, Base, Arbitrum, and Robinhood. ABIs, registries, validation, tests, smoke scripts, release metadata, and documentation are updated accordingly. ChangesBoardwalk v1 migration
Estimated code review effort: 5 (Critical) | ~120 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 4 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit bb92e68. Configure here.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bb92e68697
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- assertDeployed: only claim Ethereum-only scoping for the staking/ governance keys; multi-chain singletons get a not-yet-registered hint - launch, launch-cost, cast-visibility, stake-bwlk: resolve launchFactory/bwlkToken via assertDeployed so placeholder registries fail loudly instead of encoding calls to the zero address - member-discount: restore the >=100% discount clamp so an out-of-range bps can never produce a negative cost - smoke: accept the new 'ineligible' vote gating error
resolveLaunchedToken now asserts the factory is deployed, so the placeholder registry short-circuits before the LaunchCreated checks.
There was a problem hiding this comment.
Actionable comments posted: 7
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/smoke.mjs`:
- Around line 73-88: Update the okOn validation in scripts/smoke.mjs to require
Base calldata to end with BUILDER_CODE_HEX using endsWith(), and reject calldata
ending with that builder code for non-Base chains. Preserve the existing
calldata prefix, address, value, and chainId checks.
In `@src/builders/launch.ts`:
- Line 33: Update the contract resolution in the launch flow to obtain
launchFactory through assertDeployed(chainId, "launchFactory") before
readLaunchCost issues the multicall, while preserving bwlkToken resolution and
existing behavior for deployed chains.
In `@src/builders/stake-bwlk.ts`:
- Around line 15-17: Update the contract initialization in the stake builder to
resolve the BWLK token through assertDeployed(chainId, "bwlkToken") instead of
accepting the unguarded bwlkToken value from getContracts, while preserving the
existing router and tracker guards.
In `@src/builders/swap.ts`:
- Around line 27-53: Update currentTaxBps to accept the chain’s latest block
timestamp instead of reading Date.now(), and use that value for elapsed-time
calculation. Obtain the timestamp through the existing swap read path and pass
it into currentTaxBps, preserving the existing phase and tax calculations.
In `@src/registry/contracts.ts`:
- Line 153: Update the deployment failure message used by assertDeployed in
contracts.ts so it does not claim every missing contract is Ethereum-only. Use a
neutral message for general contracts, or select the Ethereum-only wording only
for the relevant staking, governance, and participation-reward contract keys.
In `@src/registry/launch-config.ts`:
- Line 50: Update the FALLBACK ChainLaunchConfig created by makeLaunchConfig to
use the canonical WETH raise-token symbol instead of ETH, ensuring
getLaunchConfig(undefined) matches supported-chain configurations and interface
documentation.
In `@test/builders.test.ts`:
- Around line 184-205: The builder tests currently verify approval destinations
but not approval calldata. Update the approval assertions in
buildStakeBwlkSteps, the vote builder test, and the visibility builder test to
compare encoded data with encodeFunctionData(...) for
approve(STAKED_BWLK_TRACKER, amount), approve(GOVERNANCE_VOTER, burnAmount), and
approve(BOOST_BURN, expectedCost), respectively, including each applicable
builder suffix.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 5c6ec260-a395-411c-b42a-3a59eab66bd1
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (39)
.claude-plugin/plugin.jsonAGENTS.mdCLAUDE.mdREADME.mdpackage.jsonscripts/smoke.mjsskills/boardwalk/SKILL.mdskills/boardwalk/plugins/boardwalk.mdsrc/builders/cast-visibility.tssrc/builders/claim-participation-rewards.tssrc/builders/handle-rewards.tssrc/builders/launch.tssrc/builders/stake-bwlk.tssrc/builders/swap.tssrc/builders/unstake-bwlk.tssrc/builders/vote.tssrc/cli.tssrc/constants.tssrc/index.tssrc/launch/build-launch-config.tssrc/launch/member-discount.tssrc/launch/token-identity.tssrc/registry/abis/BoardwalkToken.tssrc/registry/abis/BoostBurn.tssrc/registry/abis/GovernanceVoter.tssrc/registry/abis/IntegratorFeeCollector.tssrc/registry/abis/LaunchFactory.tssrc/registry/abis/ParticipationDistributor.tssrc/registry/abis/PresaleManager.tssrc/registry/abis/RewardRouter.tssrc/registry/abis/UniswapV2Router.tssrc/registry/abis/index.tssrc/registry/chains.tssrc/registry/contracts.tssrc/registry/launch-config.tssrc/types.tstest/build-launch-config.test.tstest/build-launch-link.test.tstest/builders.test.ts
- swap: read chain time from Multicall3's getCurrentBlockTimestamp in the existing multicall instead of the host clock, so anti-whale decay math can't be skewed by clock drift - smoke: check the builder code as a strict calldata suffix on Base and reject it on other chains - launch-config: fallback raise-token symbol is wETH, matching every supported chain - tests: assert approve calldata (spender + amount) for the stake, vote burn, and visibility approvals
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@test/resolve.test.ts`:
- Around line 9-12: Move the launchFactory override for chainContracts[base.id]
into a beforeEach setup, capture its original value, and restore it in afterEach
so each test starts with the dummy address but shared registry state remains
unchanged afterward.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 136d00ec-b860-40f6-bec2-f2aefb1e4e55
📒 Files selected for processing (7)
scripts/smoke.mjssrc/builders/cast-visibility.tssrc/builders/launch.tssrc/builders/stake-bwlk.tssrc/launch/member-discount.tssrc/registry/contracts.tstest/resolve.test.ts
🚧 Files skipped from review as they are similar to previous changes (6)
- src/launch/member-discount.ts
- src/builders/stake-bwlk.ts
- src/registry/contracts.ts
- src/builders/cast-visibility.ts
- scripts/smoke.mjs
- src/builders/launch.ts
Registry now carries the live Ethereum, Base, Arbitrum, and Robinhood addresses. Each was verified on-chain: every entry has code, and each LaunchFactory's BWLK / INTEGRATOR_COLLECTOR / nftCollection / boardwalkFeeCollector / router / factory reads back matching the table (burn 100 BWLK, graduation 5 WETH both paths, 5000 bps member discount). - Ethereum BWLK staking wired to RewardRouterV5 over the sBWLK -> sbBWLK -> sbfBWLK trackers; the router is initialized and registered as a handler on all three. - vote: derive the epoch from EPOCH_ZERO/EPOCH_DURATION and the block timestamp instead of calling currentEpoch(), which reverts before epoch 0 opens, and report the opening time instead of an opaque multicall failure. isOptionEligible moves to the second batch. - Default RPCs for all four chains; Ethereum previously fell through to a viem default that fails, breaking every read on that chain. - smoke: run all four chains, assert the full ERC-8021 suffix (the builder code is not the trailing bytes, so the previous endsWith check could never pass), and skip launch-token commands where the indexer has no launches.
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
skills/boardwalk/SKILL.md (1)
91-91: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winDocument the
--txlaunch-metadata input.The command table lists only
--token --chain, but the required flow below useslaunch-metadata --tx <create-launch tx hash>and describes--tokenas the alternative. Make that alternative explicit in the table so users do not infer that--txis unsupported.Proposed fix
-| `launch-metadata` | Upload logo to CDN, then print an EIP-712 payload to sign + the submit request | `--token --chain` · logo: ... +| `launch-metadata` | Upload logo to CDN, then print an EIP-712 payload to sign + the submit request | `--token <addr> \| --tx <hash> --chain` · logo: ...As per coding guidelines,
skills/boardwalk/**/*.{md,mdx}documentation must remain synchronized with CLI and SDK behavior.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@skills/boardwalk/SKILL.md` at line 91, Update the launch-metadata entry in the command table to document --tx as an accepted input alongside --token, indicating that --tx takes the create-launch transaction hash and --token is the alternative. Keep the existing --chain and optional argument documentation unchanged, and ensure the description matches the required flow below.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@skills/boardwalk/SKILL.md`:
- Line 38: Update the documented npx invocation in the CLI usage section to pin
the package explicitly to `@useboardwalk/sdk`@1.0.0, while preserving the existing
boardwalk command and arguments.
---
Outside diff comments:
In `@skills/boardwalk/SKILL.md`:
- Line 91: Update the launch-metadata entry in the command table to document
--tx as an accepted input alongside --token, indicating that --tx takes the
create-launch transaction hash and --token is the alternative. Keep the existing
--chain and optional argument documentation unchanged, and ensure the
description matches the required flow below.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: a8026767-75af-4cd8-94a8-12dfa90db0c1
📒 Files selected for processing (9)
README.mdscripts/smoke.mjsskills/boardwalk/SKILL.mdsrc/builders/vote.tssrc/constants.tssrc/launch/build-launch-config.tssrc/registry/abis/RewardRouter.tssrc/registry/contracts.tstest/builders.test.ts
🚧 Files skipped from review as they are similar to previous changes (3)
- src/launch/build-launch-config.ts
- src/registry/abis/RewardRouter.ts
- test/builders.test.ts
- SKILL.md pinned the npx invocation to @useboardwalk/sdk@1.0.0, matching the plugin doc, so the documented command can't resolve to a future release - the launch-metadata command row listed only --token; --tx (the create-launch tx hash) is the recommended input and the flow below already uses it
Same rug-pull concern as the skill docs: an unpinned npx resolves to whatever is published later. Adds the pinned examples to the version-bump checklist in CLAUDE.md/AGENTS.md so they can't drift from package.json.
The indexer now serves chains 1, 4663, 8453, and 42161 and rejects the
deprecated ones, so Robinhood reads work end to end.
- ApiError carries the backend's {error} body into its message, so a miss
reads 'API 404: Launch not found' rather than 'API 404: Not Found'
- smoke: run the indexer-backed lifecycle commands on every chain even
when no launch is indexed, asserting the not-found gate and failing on
an unsupported-chain rejection. Verified non-vacuous against a wrong
host, which fails as expected

What
Breaking release aligning the SDK with the redeployed Boardwalk contracts (boardwalk-contracts
893627c, SPEC.md).robinhoodchain definition (RPC, Blockscout, multicall3).stake-bwlk/unstake-bwlkcommands (Ethereum-only, default--chain ethereum),bwlkTokenregistry key,bwlkBurnCostmeta key,approve-bwlkstep ids,--claim-bwlkhandle-rewards flag.OptionIneligiblepre-check (3-consecutive-wins cap). Staking/handle-rewards/participation claims re-scoped Base → Ethereum via the Morphex RewardRouterV5 stack (approve targets the staked-BWLK tracker).swapnow usesswapExactTokensForTokensSupportingFeeOnTransferTokenswith a tax-adjusted quote — launch tokens are fee-on-transfer, so the plain variant reverts the K-check on sells and bypasses the tax on buys' min-out.out/artifacts (the checked-inabis/*.jsonin boardwalk-contracts is stale BMX-era output — worth cleaning up there). RewardRouter ABI taken from morphex-contractsRewardRouterV5.sol; verify against the deployed router at address-fill time.member-discountnow mirrors the contract's rounding exactly (base - base*bps/10000; the old form could under-approve by 1 wei), integratorquotehandling updated for the new(0,0)-on-nothing-claimable behavior, and launch config enforces the 4-fee/5-vesting recipient caps client-side.smoke.mjsnow runs a Base leg + an Ethereum leg (BOARDWALK_ETH_RPC).--version, SKILL.md, and the plugin doc.Why
The contracts were fully redeployed (new chain set, BWLK token, 5 ETH threshold, 90/10 revenue split, canonical Uniswap V2, Ethereum governance home). No back-compat is kept by design.
Reviewer notes
src/registry/contracts.tsare zero placeholders until the deployment lands (expected shortly); canonical Uniswap V2 + WETH addresses are real.assertDeployedfails loudly in the meantime, and tests inject dummy addresses.npm run typecheck,npm test(79 tests), andnpm run buildpass.npm run smokewill fail until addresses land — expected.BoardwalkToken._calculateTax, vote guard order vsGovernanceVoter.vote(), approve spenders per contract pull-flow, and every documented flag/step-id againstsrc/cli.ts.migratecommand (waiting on snapshot/proof distribution).Summary by CodeRabbit