Skip to content

Conversation

@youssefea
Copy link
Contributor

What changed? Why?

Adding Builder Codes section to the docs

@cb-heimdall
Copy link
Collaborator

cb-heimdall commented Oct 21, 2025

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

(address user, bytes32 code, uint16 feeBps)
```

- `user` → The user address on Base (NOT the Twin contract address)

Choose a reason for hiding this comment

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

Maybe we could be more explicit here. user is really just the intended recipient address on Base.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

```

<Note>
**Why `to = BRIDGE_CAMPAIGN_ADDRESS`?** Because the tokens must arrive at the Bridge campaign first; `Flywheel.send(...)` attributes the action before the campaign forwards/finalizes as designed.

Choose a reason for hiding this comment

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

The key point is: when using a builder code, the token transfer must send the tokens to BRIDGE_CAMPAIGN_ADDRESS. That contract will then forward the tokens to the intended user (recipient).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated - thanks

data: abi.encodeWithSelector(Counter.increment.selector)
```

**With builder code** (prepend Flywheel + keep Counter call): Wrap both calls in a `Multicall` executed by `DelegateCall` from the Twin contract context.

Choose a reason for hiding this comment

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

We could revisit this once we’ve deployed CBMulticall on Base mainnet and Sepolia. For now, let’s link this contract from our current implementation, and later we can add the deployment addresses.

Maybe we could add a small description on why CBMulticall is recommended here instead of the canonical Multicall (because we want to support doing delegate calls with values).

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.

3 participants