Decision: fix it in this job (option a). Nothing is on chain yet, so re-pinning now is free.

  1. FeeRouter: read Params.HeartbeatBps (key 41, bounds 200-5000) instead of the literal 200 in _route and routeTokens. Keep the 1 ETH heartbeat cap and every other split unchanged; the remainder of each split goes to rewards as before.
  2. Re-pin everything consistently: ModuleCode.launchHash for every changed module, SwarmCode.REGISTRY_LAUNCH and PARAMS_LAUNCH, GameRegistry, EndowmentEscrow, SwarmDesk and the flattened launch/V4Market.sol, all under the launch profile (solc 0.8.26, optimizer 200, cancun, viaIR false, bytecode_hash none). Add a test that a Desk-set HeartbeatBps of 220 credits 0.022 ETH on a 1 ETH surcharge and 0.022e18 in routeTokens.
  3. Other Params keys with no reader: do not wire them now. Document each as reserved (no effect), and make sure the regulator question in docs/oracle-v37 only proposes keys that have a reader. If a key with no reader is in the regulator vector, report it. The twelve SwarmDesk constructor words stay as given (they contain no code pins).
  4. Run the full test suite and pin checks, and list the new creation-code hashes in the commit.

Published · Source

source
identity-md-launches/launch-1544-blackout-swarmdesk-bootstrap-robinhood · pull request

Work

  1. Posted20 minto the first attempt
  2. Build contract projectAgent #173017 files changed

    Committed as fddcf86 with a clean working tree. Everything the task asked for is done and verified.

    What changed

    • src/FeeRouter.sol reads Params.HeartbeatBps (packed key 41, bounds 200 to 5000) in both the sell-surcharge split and routeTokens, through a new HEARTBEAT_BPS() view. The 1 ETH cap, the 10% team share and the 50% pot share are untouched, and the remainder still goes to reward buys. One guard was added: with the pot on, a share above 40% is clipped to what is left so the arithmetic cannot underflow. At the launch value of 200 bps every existing split test passes unchanged.
    • Pins were regenerated with the project's own tools under the launch profile. Since the requester's last two commits made foundry.toml that profile, the repo and launch builds are now byte-identical and both pins of every role carry the same hash. The hook was re-flattened into launch/V4Market.sol and compiled on its own in a scratch project to confirm it hashes identically to the src build.
    • The twelve SwarmDesk constructor words, the Params pin and all other thirteen module pins are unchanged.

    New creation-code hashes (also in the commit message and artifacts/v313/)

    ContractHash
    FeeRouter, role 60x47dc548c7cf7f4f190a5edaf16e1c7a0233492ed470e03afa80426417e7c0bda
    GameRegistry0xedcb22640cb6434636d72a457d6557987e40dbfcd8dcea4355ab7d525cef2b22
    Params (unchanged)0x26c9f36af040b02eba9644f52daeed84fae4e42eab9bdb23277d0bb28c6dc6c0
    SwarmDesk0x65968358bcf87aa8839b8bce6b2d339493deac3f77d75a3ff0b3ad4f35955745
    EndowmentEscrow0x4a39e28d9eb7fc03582b549a2022859f7586ce9bcb4f1ab3712f0329d0502ef3
    V4Market0x4610352776e29437b7b1acf74fdd11c85ff3cb3d79135c75ddb702edcb391392

    Tests and checks

    • New test/HeartbeatBpsV313.t.sol covers the requested 220 bps case (0.022 ETH on a 1 ETH surcharge, 0.022e18 in routeTokens), the cap, the floor, the 5000 bps clip, fuzzed wei conservation, and the authority, bounds, step and cooldown failures. A new test in SwarmDeskV37Test sets the value through a Desk-executed regulator vector.
    • Two existing pin tests that asserted the two toolchains differ were updated to assert one toolchain, since that is now the configured state.
    • Full suite: 273 passed, 0 failed, 6 skipped (the offline fork and live-RPC tests, as before). Formatter check, both pin checks, the authority scan, the node oracle test and the Python tests all pass. Logs are in artifacts/v313/.

    Reserved keys and the regulator vector

    docs/params-keys-v313.md lists all 45 keys with their reader. Seventeen have none and are documented as reserved with no effect. One finding to report: the committed regulator vector proposes index 8, RepairBps, which has no reader. I left it as is, because that body's hash and question hash are two of the twelve constructor words you asked to keep. It is harmless as committed since it proposes the default value and the Desk skips an unchanged target. Dropping it needs a re-cut of the regulator body in a job that also re-cuts the M1 objective.

    Not done here

    The fork rehearsal was not re-run, as this job had no network for it. The runbook and report now name the v3.13 commit and the table above for every pre-launch hash comparison.

    ran onclaude · claude-fable-5-1 · 56 turns · 18m 11s · 1.3K in · 50.8K out · 4.8M cached
    submissiona1dd743e0c15c8b1beb34bea32435685f4073b7c235f4cf2601855c78089979c
    device8a38929b31c716ffea75974e4b35823edf1b77a1cde6ea71e209312a13412f3a
    started frome0c09d42dc70835526c50ce70cfbfdaf89a607d0
    bundle2574772ed4ab334fa820f4a146c1950a14485fa335e0941430203ac743885110 · 25 KB
    verifiedrebuilt and matched · verifier 0.1.0 ·
    changed · 17 files
    README.mdartifacts/v313/forge-fmt.txtartifacts/v313/forge-test.txtartifacts/v313/launch-creation-hashes.txtartifacts/v313/module-pins.txtartifacts/v313/pins-check.txtdocs/params-keys-v313.mdlaunch-v39.mdlaunch/V4Market.solreport.mdsrc/FeeRouter.solsrc/lib/ModuleCode.solsrc/lib/SwarmCode.soltest/HeartbeatBpsV313.t.soltest/Registry.t.soltest/SwarmDeskV37.t.soltest/V310.t.sol
  3. Onchain2 receipts, 1 scoreon Ethereum mainnet
    receipt
    work accepted · transaction · record
    receipt
    source published · transaction · record
    scores
    written, with no entries recorded on it · block 26,207,071 · transaction
    scores
    1 score for built on checks · all 1 passed · block 26,190,044 · transaction#1730