Skip to content

Rebrand BWS -> BWLK and retarget the CCA launch to Ethereum mainnet - #2

Merged
daedboi merged 10 commits into
mainfrom
bwlk-ethereum-launch
Jul 17, 2026
Merged

Rebrand BWS -> BWLK and retarget the CCA launch to Ethereum mainnet#2
daedboi merged 10 commits into
mainfrom
bwlk-ethereum-launch

Conversation

@daedboi

@daedboi daedboi commented Jul 15, 2026

Copy link
Copy Markdown
Member

What

The Arbitrum BWS auction did not graduate; the launch is being redone on Ethereum mainnet under the new ticker BWLK. This PR carries the full retarget:

  • Token contracts (Sherlock-audited): strict identifier rename only. BWS.sol -> BWLK.sol, BwsMigration.sol -> BwlkMigration.sol, UnsoldBurner.sol, plus their interfaces. Reverse-applying bwlk -> bws to each renamed file reproduces the audited source byte-for-byte (verifiable with sed 's/BWLK/BWS/g; s/Bwlk/Bws/g; s/bwlk/bws/g' <file> | diff - <(git show 'af172cc:<old path>')). No error or event names contained the ticker, so no selectors or topics change beyond the intentionally renamed public getters.
  • script/bws/ -> script/bwlk/, ArbitrumConfig -> EthereumConfig: chain id 1; mainnet WETH / UniversalRouter / PositionManager / PoolManager; the v3.1.0 LiquidityLauncher + LBPStrategy (0x49380c4E...E6000) and its initializerFactory() (0x000000001F26...63F8) - all verified live on-chain, mutually consistent, struct layouts field-identical to the v3.1.0 sources.
  • New supply split (pinned by a unit test): 2,711,068 migration (86.07%) / 157,500 CCA sale (5%) / 157,500 LP seed (5%) / 123,932 LP incentives (3.93%).
  • No graduation threshold: script default 0; the launch command must attest via CCA_ZERO_GRADUATION_ATTESTED=true. Floor/tick are required envs until the BWLK floor is announced.
  • ArbSys machinery removed: mainnet's CCA clock is plain block.number, so the simulation shim and the --skip-simulation broadcast requirement are gone; fork tests drive the clock with vm.roll.
  • BMX_ADDRESS is now required in scripts 03/04 (the Ethereum-side migration source is being re-scoped).

Testing

  • Full non-fork suite: 1325 tests pass; forge fmt --check clean under CI's forge 1.7.1.
  • Fork tests retargeted to mainnet and passing against the live v3.1.0 deployment, including the full pipeline: script multicall -> real registered auction -> bid -> graduate -> migrate -> v4 pool init -> LP minted to LPLocker -> registerPosition -> unsold burn.
  • Base-fork migration test passes unchanged (real trackers).

Reviewer notes

  • The auction window is July 16 19:00 UTC -> July 19 19:00 UTC (12:00 PT), exactly 21,600 blocks at mainnet's fixed 12s cadence.
  • SPEC.md/AGENTS.md still describe the Arbitrum era; the docs rewrite follows once the migration re-scope lands (README is updated).
  • Open before launch: BWLK floor/tick values, mainnet staking/governance/burner deploys, Ethereum BMX source address.

Summary by CodeRabbit

  • New Features

    • Added an Ethereum BWLK lifecycle flow, including token deployment, governance setup, migration, CCA launch, and unsold-token burning.
    • Introduced a centralized Ethereum configuration bundle to power the BWLK deployment runbooks.
  • Updates

    • Retargeted go-live gates and launch guidance from BWS (Arbitrum) to BWLK (Ethereum), with stricter chain validation and updated wiring.
    • Switched protocol revenue routing to the Ethereum hub and updated governance/tax splitting to 90% governance / 10% treasury.
    • Updated DEX/cross-chain/fee documentation and naming across the protocol.
  • Tests

    • Migrated and expanded unit and fork tests to validate the full BWLK end-to-end lifecycle.

…nnet

Token contracts (Sherlock-audited) change by strict identifier rename
only: reverse-applying bwlk->bws to BWLK.sol, BwlkMigration.sol,
UnsoldBurner.sol and their interfaces reproduces the audited sources
byte-for-byte. No error or event names contained the ticker, so no
selectors or topics change beyond the intentionally renamed public
getters.

Launch retarget: EthereumConfig (chain 1, mainnet WETH/v4 trio, the
v3.1.0 LiquidityLauncher/LBPStrategy and its initializerFactory - all
verified live on-chain, struct layouts field-identical to v3.1.0
sources). New supply split: 2,711,068 migration / 157,500 CCA sale /
157,500 LP seed / 123,932 LP incentives. No graduation threshold:
default 0, launch must attest via CCA_ZERO_GRADUATION_ATTESTED. Floor
and tick are required envs until announced. The ArbSys simulation shim
is gone - mainnet's CCA clock is plain block.number, so vm.roll drives
the fork tests and broadcast simulation needs no workarounds. BMX
source address is a required env pending the migration re-scope.

Fork tests retarget to mainnet (launch pipeline, unsold burner, deploy
gate - all pass against the live v3.1.0 deployment); the Base-fork
migration test passes unchanged. Full non-fork suite: 1325 tests.
@cursor

cursor Bot commented Jul 15, 2026

Copy link
Copy Markdown

PR Summary

High Risk
Large launch/migration surface (fixed supply buckets, CCA immutables, go-live assert gate) on mainnet with open items (BMX source, floor/tick, staking deploys); mis-wiring can strand migration pool or unsold tokens.

Overview
Rebrands the protocol token from BWS to BWLK and moves the failed Arbitrum CCA relaunch to Ethereum mainnet as the token’s economic home. Token contracts (BWLK, BwlkMigration, UnsoldBurner) and interfaces are identifier renames from the audited BWS stack; deployment moves from script/bws/ + ArbitrumConfig to script/bwlk/ + EthereumConfig (chain id 1, mainnet Uniswap v4 + v3.1.0 LiquidityLauncher/LBPStrategy).

Supply and launch parameters change: CCA bucket is 315,000 BWLK (157,500 auction + 157,500 LP seed) vs the old 438,932 BWS split; migration pool stays 2,711,068 with a new 123,932 LP incentives bucket in config. CCA defaults drop Arbitrum floor/tick/graduation math—no graduation threshold (default 0, requires CCA_ZERO_GRADUATION_ATTESTED), and floor/tick are required env until announced. ArbSys simulation and --skip-simulation broadcast shims are removed; mainnet fork tests use vm.roll for the auction clock.

Ops wiring: BMX_ADDRESS is required in migration/assert scripts (no Arbitrum default); README and runbooks point at script/bwlk/* and $ETH_RPC. Old script/bws/ deploy entrypoints and BWS.t.sol are removed; tests/forks retarget to Ethereum mainnet CCA pipeline.

Reviewed by Cursor Bugbot for commit 8325ec6. Configure here.

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The PR retargets token, migration, deployment, CCA launch, governance, revenue bridging, burner, and validation flows from Arbitrum BWS to Ethereum BWLK. It adds Ethereum constants, canonical DEX and lane configuration, updates runbooks, and migrates unit, integration, invariant, and fork coverage.

Changes

BWLK Ethereum migration

Layer / File(s) Summary
BWLK contracts and protocol configuration
src/core/*, src/governance/*, src/token/*, src/interfaces/*, script/*Config.sol
BWS/BMX naming and wiring are replaced with BWLK/Ethereum equivalents across token, migration, governance, launch, fee, and revenue-bridging contracts.
Ethereum deployment and launch sequence
README.md, script/bwlk/*, script/02_DeployFactory.s.sol, script/06_DeployRevenueBridging.s.sol, script/05_AddLockboxPeer.s.sol
Deployment scripts resolve canonical per-chain infrastructure, deploy and validate the BWLK stack, configure Ethereum revenue routing, and document the ordered migration and go-live flow.
Fixtures and validation coverage
test/bwlk/*, test/unit/*, test/integration/*, test/invariant/*, test/fork/*
Mocks and tests cover BWLK token behavior, migration accounting, governance, CCA launch and burning, deployment guards, fee schedules, revenue bridging, and Ethereum fork behavior.
Protocol documentation
README.md, SPEC.md, AGENTS.md
Protocol, fee, governance, DEX, cross-chain, deployment, and timelock documentation is updated for BWLK and Ethereum.

Estimated code review effort: 5 (Critical) | ~120 minutes

Sequence Diagram(s)

sequenceDiagram
  participant DeployBWLK
  participant BwlkMigration
  participant DeployBwlkGovernance
  participant LaunchBwlkCca
  participant AssertBwlkDeploy
  DeployBWLK->>BwlkMigration: deploy and fund migration pool
  DeployBwlkGovernance->>BwlkMigration: wire BWLK trackers and governance
  LaunchBwlkCca->>BwlkMigration: configure migration parameters
  AssertBwlkDeploy->>LaunchBwlkCca: validate BWLK launch wiring
Loading

Possibly related PRs

Poem

A rabbit hops from BWS to BWLK,
Through Ethereum’s blocks so silky.
Trackers align, auctions glow,
Unsold tokens burn below.
“Binky!” says Bun, “the migration’s sprightly!”

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the two main changes: BWS-to-BWLK rebrand and moving the CCA launch to Ethereum mainnet.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

governanceVoter.initializePeers(address(lpLocker), address(participationDistributor), feeCollector);

P1 Badge Re-home Ethereum revenue before wiring the voter

When using this Ethereum deployment path, the voter only receives revenue if the chain's BoardwalkFeeCollector has governanceVault set to it (src/core/BoardwalkFeeCollector.sol:159-166). The unchanged revenue mesh still treats chain id 1 as a source lane to Base and explicitly tells ops to repoint treasury to the bridger while keeping governanceVault == address(0) (script/06_DeployRevenueBridging.s.sol:10-28, script/CrossChainConfig.sol:73-79). If both runbooks are followed after this retarget, Ethereum revenue is forwarded down the Base-bridger path and this BWLK voter never receives its 70% governance budget; the Ethereum lane/runbook needs to be removed or re-homed with the voter as the vault.

ℹ️ 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".

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🧹 Nitpick comments (1)
test/fork/UnsoldBurnerFork.t.sol (1)

51-54: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Source the fork-test addresses from script/bwlk/EthereumConfig.sol. test/fork/UnsoldBurnerFork.t.sol:52-54 duplicates values that already live in EthereumConfig (ETH_CCA_FACTORY, ETH_LIQUIDITY_LAUNCHER, ETH_LBP_STRATEGY), so this can drift for no benefit.

🤖 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 `@test/fork/UnsoldBurnerFork.t.sol` around lines 51 - 54, Replace the
duplicated address literals in UnsoldBurnerFork’s CCA_FACTORY,
LIQUIDITY_LAUNCHER, and LBP_STRATEGY constants with the corresponding
ETH_CCA_FACTORY, ETH_LIQUIDITY_LAUNCHER, and ETH_LBP_STRATEGY values from
EthereumConfig. Preserve the existing test references while sourcing these
addresses from the shared configuration.
🤖 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 `@script/bwlk/04_AssertBwlkDeploy.s.sol`:
- Around line 229-235: The supply-only validation around
IERC20Meta(cfg.bwlk).totalSupply in script/bwlk/04_AssertBwlkDeploy.s.sol lines
229-235 must also verify cfg.bwlk against an independently attested canonical
deployment address or deployment-specific code hash. Apply the same canonical
identity check in script/bwlk/05_DeployUnsoldBurner.s.sol lines 25-29 before
embedding the token in UnsoldBurner; retain the existing supply validation.
- Around line 187-189: Update the warning in _assertCcaWiring for an unset
cfg.lpLocker to state that governance one-shots A-5 through A-9 are not checked,
so every skipped locker assertion is reported.

In `@script/bwlk/06_LaunchBwlkCca.s.sol`:
- Around line 410-413: Complete the Ethereum retarget across all listed
documentation sites: in script/bwlk/06_LaunchBwlkCca.s.sol lines 410-413, use
the Ethereum mainnet RPC variable instead of $ARB_RPC; update src/token/BWLK.sol
lines 6-8 to identify BWLK as the Ethereum mainnet token; revise the Arbitrum
deployment references in script/bwlk/02_DeployBwlkGovernance.s.sol lines 10-14;
describe the Ethereum BMX-to-BWLK migrator in
script/bwlk/03_DeployBwlkMigration.s.sol lines 10-13; update the Ethereum
go-live gate wording in script/bwlk/04_AssertBwlkDeploy.s.sol lines 69-72; and
replace “brought to Arbitrum” with Ethereum migration wording in lines 91-93.

In `@src/interfaces/ILiquidityLauncher.sol`:
- Line 5: Correct the malformed NatSpec sentence in the liquidity launcher
interface comment by rewriting it as a grammatically valid description, such as
“The Uniswap LiquidityLauncher calls made by the BWLK CCA launch script.”

In `@test/fork/BwlkEthereumDeployFork.t.sol`:
- Around line 67-70: Track whether BMX is a valid deployed token before
replacing it with the MockERC20 fallback, then update
testFork_BmxIsNonFeeOnTransfer to skip when the real token is unavailable. Keep
the mock fallback for other tests, but ensure this proof cannot pass against
MockERC20.

---

Nitpick comments:
In `@test/fork/UnsoldBurnerFork.t.sol`:
- Around line 51-54: Replace the duplicated address literals in
UnsoldBurnerFork’s CCA_FACTORY, LIQUIDITY_LAUNCHER, and LBP_STRATEGY constants
with the corresponding ETH_CCA_FACTORY, ETH_LIQUIDITY_LAUNCHER, and
ETH_LBP_STRATEGY values from EthereumConfig. Preserve the existing test
references while sourcing these addresses from the shared configuration.
🪄 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: 98bb80d8-6e5c-4394-bd59-c587430b2add

📥 Commits

Reviewing files that changed from the base of the PR and between af172cc and 8325ec6.

📒 Files selected for processing (35)
  • README.md
  • script/bwlk/01_DeployBWLK.s.sol
  • script/bwlk/02_DeployBwlkGovernance.s.sol
  • script/bwlk/03_DeployBwlkMigration.s.sol
  • script/bwlk/04_AssertBwlkDeploy.s.sol
  • script/bwlk/05_DeployUnsoldBurner.s.sol
  • script/bwlk/06_LaunchBwlkCca.s.sol
  • script/bwlk/EthereumConfig.sol
  • script/bws/01_DeployBWS.s.sol
  • script/bws/ArbitrumConfig.sol
  • src/interfaces/IBWLK.sol
  • src/interfaces/IBwlkMigration.sol
  • src/interfaces/ICcaAuctionFactory.sol
  • src/interfaces/ILBPStrategy.sol
  • src/interfaces/ILiquidityLauncher.sol
  • src/interfaces/IMintable.sol
  • src/interfaces/IPermit2.sol
  • src/interfaces/IUnsoldBurner.sol
  • src/token/BWLK.sol
  • src/token/BwlkMigration.sol
  • src/token/UnsoldBurner.sol
  • test/bwlk/LaunchCcaMocks.sol
  • test/bwlk/MockMorphexStaking.sol
  • test/bwlk/UnsoldBurnerMocks.sol
  • test/fork/BwlkEthereumDeployFork.t.sol
  • test/fork/BwlkMigrationFork.t.sol
  • test/fork/LaunchBwlkCcaFork.t.sol
  • test/fork/UnsoldBurnerFork.t.sol
  • test/unit/BWLK.t.sol
  • test/unit/BWS.t.sol
  • test/unit/BwlkDeployAssertion.t.sol
  • test/unit/BwlkMigration.t.sol
  • test/unit/BwlkMigrationMerkle.t.sol
  • test/unit/LaunchBwlkCca.t.sol
  • test/unit/UnsoldBurner.t.sol
💤 Files with no reviewable changes (3)
  • test/unit/BWS.t.sol
  • script/bws/01_DeployBWS.s.sol
  • script/bws/ArbitrumConfig.sol

Comment thread script/bwlk/04_AssertBwlkDeploy.s.sol
Comment thread script/bwlk/04_AssertBwlkDeploy.s.sol
Comment thread script/bwlk/06_LaunchBwlkCca.s.sol Outdated
Comment thread src/interfaces/ILiquidityLauncher.sol Outdated
Comment thread test/fork/BwlkEthereumDeployFork.t.sol Outdated
- Gate warning now reports the full skipped range (A-5..A-9)
- Finish the Ethereum retarget in script docs: launch runbook prints
  $ETH_RPC; 02/03/04 titles and comments no longer say Arbitrum
- ILiquidityLauncher notice reworded for clarity
- The fork-test BMX non-fee-on-transfer proof skips when the real
  token address is unavailable instead of passing against the mock
- UnsoldBurnerFork sources the CCA addresses from EthereumConfig
- Revenue-mesh script: the Ethereum source lane is explicitly retired
  for the BWLK era (Ethereum is the governance home; bridging its
  revenue to Base would starve the voter's 70% budget)

The audited src/token sources stay strictly rename-only (their chain
wording updates with the migration re-scope docs pass) so the
byte-for-byte reverse-rename diff vs the Sherlock-audited originals
keeps holding.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 `@script/06_DeployRevenueBridging.s.sol`:
- Around line 29-34: Update run() to reject CHAIN_ETHEREUM before
vm.startBroadcast and before any _deployLifiBridger invocation, preserving
deployment for other non-Base chains. Add a regression test that exercises the
Ethereum path and asserts the expected revert.
🪄 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: ad4da8b5-dbac-47b8-a320-71fe7b256aa7

📥 Commits

Reviewing files that changed from the base of the PR and between 8325ec6 and 1c5c64e.

📒 Files selected for processing (8)
  • script/06_DeployRevenueBridging.s.sol
  • script/bwlk/02_DeployBwlkGovernance.s.sol
  • script/bwlk/03_DeployBwlkMigration.s.sol
  • script/bwlk/04_AssertBwlkDeploy.s.sol
  • script/bwlk/06_LaunchBwlkCca.s.sol
  • src/interfaces/ILiquidityLauncher.sol
  • test/fork/BwlkEthereumDeployFork.t.sol
  • test/fork/UnsoldBurnerFork.t.sol
🚧 Files skipped from review as they are similar to previous changes (7)
  • src/interfaces/ILiquidityLauncher.sol
  • script/bwlk/02_DeployBwlkGovernance.s.sol
  • script/bwlk/03_DeployBwlkMigration.s.sol
  • test/fork/UnsoldBurnerFork.t.sol
  • script/bwlk/06_LaunchBwlkCca.s.sol
  • test/fork/BwlkEthereumDeployFork.t.sol
  • script/bwlk/04_AssertBwlkDeploy.s.sol

Comment thread script/06_DeployRevenueBridging.s.sol Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1c5c64e14b

ℹ️ 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".

Comment thread script/06_DeployRevenueBridging.s.sol Outdated
daedboi added 2 commits July 15, 2026 18:55
The BWLK carve-out was documentation-only: run() on chainId 1 would
still deploy a Base-pinned RevenueBridger, and a treasury repoint to it
would ship the governance home's own revenue to Base past the voter.
Guard first, before any env read, plus a regression test.
Floor = the announced $0.30 per BWLK in ETH terms at the launch-day
Chainlink read ($1,870.97/ETH) = 0.0001603446 ETH, tick-aligned at
floor = 100 ticks. Script 06 reads both via envOr again; the pin test
covers the literals and the CCA constructor bounds for the 157,500
supply.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 49741f0974

ℹ️ 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".

Comment thread script/bwlk/06_LaunchBwlkCca.s.sol
…wap v2, Ethereum revenue hub

Rebrand BMX -> BWLK across all core contracts, scripts, and tests (migration
contracts keep BMX for the legacy token); GOVERNANCE_BPS 7000 -> 9000 (10/90
treasury/governance split) and 5 WETH graduation defaults.

Retarget the chain set to Ethereum, Base, Arbitrum, and Robinhood Chain (4663):
- Drop the forked DEX; deploy against canonical Uniswap v2 per chain
  (script/DexConfig.sol, on-chain-verified addresses), minimal IUniswapV2Pair
  for PresaleManager's seed mint.
- One standardized fee schedule: issuer 35 / boardwalk 35 / incentive 15 /
  referrer 5 / integrator 10 = 95 bps tax (+30 bps v2 pair fee = 1.25%).
  Five 2-bps integrator slots; DefiLlama Research pending via
  DEFILLAMA_RESEARCH_ADDRESS env (deploy fails loudly if unset).
- Re-home the revenue mesh to Ethereum: BaseRevenueSwapper ->
  EthereumRevenueSwapper, bridgeToEthereum with destinationChainId pinned to 1,
  all lanes pure Across V4 WETH; lane config reverts for chainId 1.
- NFT bridge: 05_AddLockboxPeer drives the typed SET_PEER timelock for new
  spokes (Robinhood mirror); CCIPConfig gains the Robinhood selector/router.
- Remove Fraxtal/Katana/Ink everywhere; delete the superseded
  03_DeployGovernance script (script/bwlk/02 is the governance deploy surface).
- Rewrite README/SPEC/AGENTS for the BWLK era; add DeployConfigs.t.sol pinning
  the production schedule and per-chain address literals.

1336 non-fork tests pass; revenue lanes fork-tested against the live Base,
Arbitrum, and Robinhood LiFi diamonds.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c50dc69e6b

ℹ️ 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".

Comment thread script/02_DeployFactory.s.sol
Comment thread script/02_DeployFactory.s.sol

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

🧹 Nitpick comments (1)
script/02_DeployFactory.s.sol (1)

38-49: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Inconsistent keeper env-var name across deploy scripts. Both scripts were updated in this PR to require a keeper address, but they now use different env-var names for the same concept, unlike every other renamed var (BWLK_ADDRESS, DEX_FACTORY, DEX_ROUTER, TREASURY) which stays consistent between them.

  • script/02_DeployFactory.s.sol#L38-L49: uses vm.envAddress("KEEPER"), matching script/bwlk/02_DeployBwlkGovernance.s.sol's convention.
  • script/test/01_TestDeploy.s.sol#L28-L55: uses vm.envAddress("KEEPER_ADDRESS") instead; align it to "KEEPER" (or vice versa) so operators don't set the wrong env var for one of the two scripts.
🤖 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 `@script/02_DeployFactory.s.sol` around lines 38 - 49, Standardize the keeper
environment-variable name across both deployment scripts: keep
script/02_DeployFactory.s.sol lines 38-49 using KEEPER, and update
script/test/01_TestDeploy.s.sol lines 28-55 to read KEEPER instead of
KEEPER_ADDRESS. Ensure both scripts use the same variable for the keeper
address.
🤖 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 `@script/04_DeployNFTBridge.s.sol`:
- Around line 35-37: The ownership timeline comment in the deployment runbook
must account for the `OWNER` configuration. Update the guidance near the NFT
bridge deployment and subsequent multisig transfer to either require `OWNER` to
equal the deployer or document the alternate path where the mirror is deployed
directly under the multisig and no later ownership transfer is performed.

In `@script/FeeSchedules.sol`:
- Around line 83-115: Update _integrators to avoid assigning the Ethereum-only
SEAL Safe to Base, Arbitrum, or Robinhood: use confirmed usable per-chain SEAL
recipients for those chain IDs, or reject those deployments until recipients are
confirmed. Preserve the 2-BPS SEAL allocation and ensure Ethereum continues
using its confirmed recipient.

In `@src/interfaces/IUniswapV2Pair.sol`:
- Around line 6-10: Add NatSpec documentation directly to the
IUniswapV2Pair.mint function, including a `@notice` or `@dev` description, an `@param`
tag for to, and a `@return` tag describing liquidity. Keep the existing function
signature and interface behavior unchanged.

In `@test/integration/GovernanceIntegration.t.sol`:
- Around line 164-167: The mock participation distributor callback must pull
BWLK rather than only recording the requested amount. Update the mock method
surrounding lastEpoch and lastAmount to transferFrom the governance contract
using the provided bwlkAmount, then update the related test assertions to verify
the distributor’s BWLK balance increases by that amount and therefore exercises
the allowance.

In `@test/unit/BoostBurn.t.sol`:
- Around line 115-116: Add descriptive failure messages to the changed balance,
score, and cost assertions in the relevant BoostBurn tests, including the
assertions around bwlk balances and the additional locations noted in the
review. Ensure each message identifies the value and expected behavior being
validated.

In `@test/unit/DeployConfigs.t.sol`:
- Around line 154-193: Extend test_CrossChainConfig_PinsLaneLiterals to assert
lifiSelector and hasSourceSwaps for every supported source chain, and add
vm.expectRevert coverage when querying lane configuration for Ethereum and
removed chains. Preserve the existing literal assertions and verify that
Ethereum remains without a source lane.

In `@test/unit/GovernanceVoter.t.sol`:
- Around line 1436-1441: Extend
test_Execute_Option4_CallsParticipationDistributor to assert
mockParticipationDistributor.lastEpoch and lastAmount after voter.execute,
verifying Option 4 creates the expected BWLK stream with the configured epoch
and amount.

---

Nitpick comments:
In `@script/02_DeployFactory.s.sol`:
- Around line 38-49: Standardize the keeper environment-variable name across
both deployment scripts: keep script/02_DeployFactory.s.sol lines 38-49 using
KEEPER, and update script/test/01_TestDeploy.s.sol lines 28-55 to read KEEPER
instead of KEEPER_ADDRESS. Ensure both scripts use the same variable for the
keeper address.
🪄 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: 7290a5cd-27ad-4869-ad7e-bdf90f1b0e6b

📥 Commits

Reviewing files that changed from the base of the PR and between 49741f0 and c50dc69.

📒 Files selected for processing (75)
  • AGENTS.md
  • README.md
  • SPEC.md
  • script/01_DeployDEX.s.sol
  • script/02_DeployFactory.s.sol
  • script/03_DeployGovernance.s.sol
  • script/04_DeployNFTBridge.s.sol
  • script/05_AddLockboxPeer.s.sol
  • script/05_WireLockboxPeers.s.sol
  • script/06_DeployRevenueBridging.s.sol
  • script/CCIPConfig.sol
  • script/CrossChainConfig.sol
  • script/DexConfig.sol
  • script/FeeSchedules.sol
  • script/bwlk/02_DeployBwlkGovernance.s.sol
  • script/bwlk/04_AssertBwlkDeploy.s.sol
  • script/test/01_TestDeploy.s.sol
  • script/test/02_TestExpressLaunch.s.sol
  • script/test/04_TestAdvancedLaunch.s.sol
  • script/test/06_TestGovernanceDeploy.s.sol
  • script/test/07_TestGovernanceVoteAndExecute.s.sol
  • script/test/BaseTestScript.s.sol
  • script/test/DryRunAll.s.sol
  • src/core/BoardwalkFeeCollector.sol
  • src/core/BoostBurn.sol
  • src/core/LaunchFactory.sol
  • src/core/PresaleManager.sol
  • src/crosschain/EthereumRevenueSwapper.sol
  • src/crosschain/RevenueBridger.sol
  • src/dex/core/UniswapV2ERC20.sol
  • src/dex/core/UniswapV2Factory.sol
  • src/dex/core/UniswapV2Pair.sol
  • src/dex/core/interfaces/IERC20.sol
  • src/dex/core/interfaces/IUniswapV2Callee.sol
  • src/dex/core/interfaces/IUniswapV2ERC20.sol
  • src/dex/core/interfaces/IUniswapV2Factory.sol
  • src/dex/core/interfaces/IUniswapV2Pair.sol
  • src/dex/core/libraries/Math.sol
  • src/dex/core/libraries/SafeMath.sol
  • src/dex/core/libraries/UQ112x112.sol
  • src/dex/periphery/UniswapV2Router02.sol
  • src/dex/periphery/interfaces/IERC20.sol
  • src/dex/periphery/interfaces/IUniswapV2Router01.sol
  • src/dex/periphery/interfaces/IUniswapV2Router02.sol
  • src/dex/periphery/interfaces/IWETH.sol
  • src/dex/periphery/libraries/SafeMath.sol
  • src/dex/periphery/libraries/TransferHelper.sol
  • src/dex/periphery/libraries/UniswapV2Library.sol
  • src/governance/GovernanceVoter.sol
  • src/governance/ParticipationDistributor.sol
  • src/interfaces/IEthereumRevenueSwapper.sol
  • src/interfaces/ILaunchFactory.sol
  • src/interfaces/IParticipationDistributor.sol
  • src/interfaces/IRevenueBridger.sol
  • src/interfaces/IRewardTracker.sol
  • src/interfaces/IUniswapV2Pair.sol
  • src/token/BWLK.sol
  • test/fork/BwlkEthereumDeployFork.t.sol
  • test/fork/CrossChainBridging.fork.t.sol
  • test/fork/GovernanceVoterFork.t.sol
  • test/gas/GasBenchmarks.t.sol
  • test/integration/FullLaunchFlow.t.sol
  • test/integration/GovernanceIntegration.t.sol
  • test/integration/IntegrationBase.t.sol
  • test/invariant/GovernanceInvariant.t.sol
  • test/unit/BoardwalkFeeCollector.t.sol
  • test/unit/BoostBurn.t.sol
  • test/unit/BwlkDeployAssertion.t.sol
  • test/unit/DeployConfigs.t.sol
  • test/unit/EthereumRevenueSwapper.t.sol
  • test/unit/GovernanceVoter.t.sol
  • test/unit/LaunchFactory.t.sol
  • test/unit/ParticipationDistributor.t.sol
  • test/unit/RevenueBridger.t.sol
  • test/unit/RevenueBridgingDeployGuard.t.sol
💤 Files with no reviewable changes (22)
  • src/dex/core/interfaces/IERC20.sol
  • src/dex/core/libraries/UQ112x112.sol
  • src/dex/core/interfaces/IUniswapV2Factory.sol
  • src/dex/periphery/interfaces/IWETH.sol
  • src/dex/core/interfaces/IUniswapV2Pair.sol
  • src/dex/periphery/interfaces/IERC20.sol
  • src/dex/periphery/interfaces/IUniswapV2Router02.sol
  • src/dex/core/libraries/SafeMath.sol
  • src/dex/core/interfaces/IUniswapV2Callee.sol
  • src/dex/core/interfaces/IUniswapV2ERC20.sol
  • src/dex/core/UniswapV2Factory.sol
  • src/dex/periphery/libraries/TransferHelper.sol
  • src/dex/core/UniswapV2ERC20.sol
  • src/dex/core/libraries/Math.sol
  • script/05_WireLockboxPeers.s.sol
  • script/03_DeployGovernance.s.sol
  • script/01_DeployDEX.s.sol
  • src/dex/periphery/interfaces/IUniswapV2Router01.sol
  • src/dex/periphery/libraries/UniswapV2Library.sol
  • src/dex/periphery/libraries/SafeMath.sol
  • src/dex/core/UniswapV2Pair.sol
  • src/dex/periphery/UniswapV2Router02.sol
🚧 Files skipped from review as they are similar to previous changes (4)
  • src/token/BWLK.sol
  • test/fork/BwlkEthereumDeployFork.t.sol
  • test/unit/BwlkDeployAssertion.t.sol
  • script/bwlk/04_AssertBwlkDeploy.s.sol

Comment thread script/04_DeployNFTBridge.s.sol Outdated
Comment thread script/FeeSchedules.sol
Comment thread src/interfaces/IUniswapV2Pair.sol
Comment thread test/integration/GovernanceIntegration.t.sol
Comment thread test/unit/BoostBurn.t.sol Outdated
Comment thread test/unit/DeployConfigs.t.sol
Comment thread test/unit/GovernanceVoter.t.sol
daedboi added 5 commits July 16, 2026 20:45
…lback

A forgotten NFT_COLLECTION on a spoke silently deployed the deprecated
soulbound BoardwalkClub and wired it into LaunchFactory + BoostBurn membership
gating, costing a 7-day SET_NFT_COLLECTION timelock on both contracts to fix.
Every chain now has a proper collection (SeaDrop on Base, a CCIP mirror on
spokes), so the env is required (fail-loud; an explicit zero still disables
discounts) and the fallback deploy + MINT_RECIPIENTS airdrop path is removed.

Also clarify the DEX env-override comment: overrides serve fork rehearsals
with a nonstandard v2 deployment; FeeSchedules.resolve pins the supported
chain set regardless of override order.
…ng from review

The confirmed SEAL address is a Gnosis Safe with code on Ethereum only; a
codeless contract wallet can neither claim nor rotate its frozen slot, so
FeeSchedules now pins it on Ethereum and leaves the slot PENDING elsewhere.
The deploy script fills pending slots from per-slot envs (DefiLlama Research
everywhere, SEAL_ADDRESS off-Ethereum) and fails loudly when unset.

Also from review: NatSpec on IUniswapV2Pair.mint; the integration PD mock now
pulls BWLK like the production distributor (exercises the voter's approval
path) with a balance-delta assertion; option-4 unit test asserts the stream
epoch/amount; descriptive messages on the BoostBurn assertions; the NFT-bridge
ownership comment documents both OWNER paths.
Convert dense prose to scannable structure with no normative content lost:
- Quick-facts table up top (chains, DEX, fees, splits, graduation).
- New diagrams: presale lifecycle, NFT bridge hub-and-spoke, revenue
  bridging flow, governance weekly cycle.
- Tables replace prose walls: tax phases, fee buckets with bounds and
  routing, integrator slots, claim rate limits, NFT delivery failure
  modes, Across calldata pinning, per-leg trust model, BWLK supply split.
- Deduplicate (referrer carve-out, INTEGRATOR_BPS immutability, presale
  lifecycle repeated in cross-contract flows) and drop analysis that
  isn't spec (claim-cap equilibrium math).
- Option 3 mechanics move out of the vote-options table into their own
  paragraph so the table stays one line per option.
Fix claims that drifted from code:
- Presale identifiers are weightedContributed/totalWeightedRaise (the
  weightedWeth names never existed post-generic-raise-token).
- Seeding mints LP to the PresaleManager and then transfers it to dead;
  pair.mint(DEAD_ADDRESS) was never the mechanism.
- Advanced vesting is required below 50% presale and forbidden at exactly
  50%; the presale window itself is admin-tunable within 5-50%.
- VestingStream's exemption is conditional on the launch having vesting.
- Interface carve-out list: drop the nonexistent IOFT, add the CCA-launch
  mirrors (ILiquidityLauncher/ILBPStrategy/ICcaAuction/ICcaAuctionFactory/
  IPermit2) and name them as the byte-identical-struct obligations.
- Review commands are /audit, /integration-check, /write-tests (bare names).
- Real deploy-script example instead of the phantom script/Deploy.s.sol.

Add what a first-time agent needs:
- Config-library index + docs/prod-deployment.txt pointer and a
  live-on-mainnet warning for src/token, src/governance, script/bwlk.
- via_ir=true and its testing gotchas (absolute warps; prank-consuming
  inlined getters); fork tests self-skip without RPC envs.
- CI installs unpinned latest-stable forge and gates fmt --check.
- Build order completed: base libs, BoostBurn, BWLK token set, governance.
@daedboi
daedboi merged commit 893627c into main Jul 17, 2026
3 checks passed
@daedboi
daedboi deleted the bwlk-ethereum-launch branch July 17, 2026 07:12
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.

1 participant