Skip to content

feat: add more launch options in extparam - #182

Open
jaimewangvirtuals wants to merge 3 commits into
mainfrom
feat/extend-ext-param
Open

feat: add more launch options in extparam#182
jaimewangvirtuals wants to merge 3 commits into
mainfrom
feat/extend-ext-param

Conversation

@jaimewangvirtuals

@jaimewangvirtuals jaimewangvirtuals commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Note

Medium Risk
Upgradeable BondingV5 gains new state slots and fee-delegation metadata that backends must encode correctly; launch/fee flows are unchanged on-chain but wrong payloads could mis-route off-chain delegation.

Overview
BondingV5 extends the preLaunch extParams_ payload (v3) while keeping V1/V2 encodings valid: bit 2 is isRobotics, bits 3–4 are feeDelegationType (none / address / twitter), and an optional second word holds feeDelegationRecipient as a right-aligned bytes32 (address or Twitter id). preLaunch persists these in new append-only storage, emits PreLaunchExtParams, and documents the length-tolerant layout.

Tests add bondingV5ExtParams.js for decoding, legacy abi.encode(bool), and the new event. Fixtures pass ACF_FAKE_INITIAL_VIRTUAL_LIQ into BondingConfig, set graduationExcessBurnWallet, grant BE_OPS_ROLE for drain helpers (replacing EXECUTOR_ROLE in one drain test), and update setBondingCurveParams call sites.

Reviewed by Cursor Bugbot for commit beeef47. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor cursor 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 3efab8f. Configure here.

bytes memory feeDelegationRecipient_ = _decodeFeeDelegationRecipient(extParams_);
isRobotics[token] = isRobotics_;
feeDelegationType[token] = feeDelegationType_;
feeDelegationRecipient[token] = feeDelegationRecipient_;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale fee delegation fields

Medium Severity

preLaunch now persists feeDelegationType and feeDelegationRecipient as on-chain source of truth, but setFeeDelegation still only updates isFeeDelegation. After an owner correction, the bool used for launch authorization can disagree with the stored type and recipient that backends read for vault setup.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 3efab8f. Configure here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

isFeeDelegation is the top-level gate for fee delegation.

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