Skip to content

fix(7702): revert BatchExecutor address — prior deploy was the spike contract#194

Merged
TuCopFi merged 1 commit into
Developmentfrom
fix/wri-revert-spike-batchexecutor-address
Jun 17, 2026
Merged

fix(7702): revert BatchExecutor address — prior deploy was the spike contract#194
TuCopFi merged 1 commit into
Developmentfrom
fix/wri-revert-spike-batchexecutor-address

Conversation

@TuCopFi

@TuCopFi TuCopFi commented Jun 17, 2026

Copy link
Copy Markdown
Member

TL;DR

Prior PR #193 wired 0x97b99a4ac0BDA988B4c9C6BA1398deB22a577be4 as the production BatchExecutor on Celo mainnet. Bytecode comparison after the merge shows that address is the SPIKE contract, not the hardened production contract.

This PR reverts BATCH_EXECUTOR_ADDRESS_CELO to the zero-address placeholder until we deploy the real hardened contract.

What I found

Bytecode size
Deployed at 0x97b99a4ac0BDA988B4c9C6BA1398deB22a577be4 1535 chars
contracts-spike/src/BatchExecutor.sol (SPIKE, "NOT for mainnet") 1535 chars
contracts/src/BatchExecutor.sol (hardened production) 1783 chars

The deploy script contracts-spike/script/DeployBatchExecutor.s.sol imports ../src/BatchExecutor.sol, which is the spike source. No broadcast log exists for contracts/.

What the spike contract is missing

  • onlySelf modifier (msg.sender == address(this)) — without it, anyone can call execute() on a delegated EOA and run arbitrary calls in its context.
  • ReentrancyGuard from OpenZeppelin.
  • EmptyBatch revert.

Source comment on the spike literally says: "SPIKE-ONLY. NOT for mainnet deployment with user funds."

Risk

Zero today. The saga7702 path is gated off behind StatsigFeatureGates.WRI_DOLLARS_SPEND_7702_V1 (defaults to false), so no users delegate to anything. But flipping Phase 1 dogfood with the spike wired would have exposed internal IDs.

Next steps

  1. Land this revert.
  2. Add contracts/script/DeployBatchExecutor.s.sol that targets the hardened source. (Follow-up PR.)
  3. User runs forge script with the production deploy key.
  4. Wire the new address. (Another follow-up PR.)
  5. Then Phase 1 dogfood.

Test plan

  • yarn build:ts clean
  • yarn lint clean
  • yarn test src/web3 src/dollarsSpend/saga7702 (45/45 pass)
  • CI checks

… not the hardened contract

PR #193 wired 0x97b99a4ac0BDA988B4c9C6BA1398deB22a577be4 as the production
BatchExecutor. Bytecode comparison after the merge shows that address holds
the SPIKE contract from contracts-spike/src/BatchExecutor.sol (deployedBytecode
1535 chars), NOT the hardened production contract at contracts/src/BatchExecutor.sol
(1783 chars).

The spike lacks:
- onlySelf modifier (msg.sender == address(this)) — without this, anyone can
  call execute() on a delegated EOA and run arbitrary calls in its context.
- ReentrancyGuard from OpenZeppelin.
- EmptyBatch guard.

Source comment on the spike literally says "SPIKE-ONLY. NOT for mainnet
deployment with user funds."

Risk of the prior PR landing as-is: zero today, because the saga7702 path is
gated off behind StatsigFeatureGates.WRI_DOLLARS_SPEND_7702_V1 (default
false), but flipping Phase 1 dogfood with the spike wired would have exposed
internal IDs to anyone-can-execute.

Restoring the zero-address placeholder. A follow-up commit lands a
contracts/script/DeployBatchExecutor.s.sol that targets the hardened source,
and once the user runs it with their deploy key we re-wire to that address.
@TuCopFi TuCopFi merged commit 8420203 into Development Jun 17, 2026
7 checks passed
@TuCopFi TuCopFi deleted the fix/wri-revert-spike-batchexecutor-address branch June 17, 2026 17:33
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