Skip to content

refactor(CHAIN-3281): Standardize task templates to use global multisig macros#624

Open
jackchuma wants to merge 3 commits intomainfrom
refactor/global-multisig-macros
Open

refactor(CHAIN-3281): Standardize task templates to use global multisig macros#624
jackchuma wants to merge 3 commits intomainfrom
refactor/global-multisig-macros

Conversation

@jackchuma
Copy link
Contributor

@jackchuma jackchuma commented Mar 1, 2026

Summary

Standardize all task templates to use the global MULTISIG_EXECUTE (and where applicable, MULTISIG_APPROVE) macros from Multisig.mk, replacing inline forge script invocations.

Templates changed

Template What changed
template-safe-management Renamed SCRIPTSCRIPT_NAME for macro compatibility
template-gas-and-elasticity-increase Replaced inline forge script in execute-rollback with MULTISIG_EXECUTE
template-pause-superchain-config Added Multisig.mk include + replaced inline execute-pause with MULTISIG_EXECUTE
template-pause-bridge-base Added Multisig.mk include + replaced inline execute-pause/execute-unpause with MULTISIG_EXECUTE
template-gas-increase Added Multisig.mk include + replaced inline execute-upgrade/execute-rollback with MULTISIG_EXECUTE

Also removed the unused MULTISIG_SIGN macro from Multisig.mk and added documentation on the macro convention in the README.

What was intentionally left alone

  • Nonce-loop signing in pause templates — these pre-sign 20 future nonces for incident response and can't be expressed with a single macro call
  • Inline eip712sign in template-gas-increase — uses sign() (no args) instead of sign(address[]), which is incompatible with the macro's expected signature

How to verify

  • make -n <target> (dry-run) on modified templates to confirm expanded commands match previous behavior
  • CI validation passes

Change management

  • type: routine
  • risk: low
  • impact: sev5
  • backwards_compatible: true
  • automerge: false

jackchuma and others added 2 commits March 1, 2026 10:18
Update all task templates in setup-templates/ to consistently use the
MULTISIG_SIGN, MULTISIG_APPROVE, and MULTISIG_EXECUTE macros from
Multisig.mk, replacing custom inline forge script and eip712sign
invocations:

- template-safe-management: Rename SCRIPT to SCRIPT_NAME for
  compatibility with the global macros' require_vars check
- template-gas-and-elasticity-increase: Replace inline forge script in
  execute-rollback with $(call MULTISIG_EXECUTE,...) to match the
  forward execute target
- template-pause-superchain-config: Add Multisig.mk include, define
  RPC_URL, and replace inline execute-pause with MULTISIG_EXECUTE
- template-pause-bridge-base: Add Multisig.mk include, define RPC_URL,
  and replace inline execute-pause/execute-unpause with MULTISIG_EXECUTE
- template-gas-increase: Add Multisig.mk include, define RPC_URL and
  SCRIPT_NAME, and replace inline execute-upgrade/execute-rollback with
  MULTISIG_EXECUTE

Nonce-loop signing patterns in pause templates are preserved as-is since
the global MULTISIG_SIGN macro does not support batch nonce-loop signing.
Sign targets in template-gas-increase are also preserved as they use
sign() (no args) rather than sign(address[]).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ions

Add a "Multisig macro convention" section to the root README explaining
the three global macros (MULTISIG_SIGN, MULTISIG_APPROVE, MULTISIG_EXECUTE)
and the canonical template pattern, including known exceptions for batch
nonce-loop signing and non-standard function signatures.

Add a header block to Multisig.mk describing the file's purpose and the
variables templates must define (RPC_URL, SCRIPT_NAME).

Add inline comments in pause and gas-increase templates explaining why
specific sign targets retain inline eip712sign instead of using the
global MULTISIG_SIGN macro.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@linear
Copy link

linear bot commented Mar 1, 2026

@cb-heimdall
Copy link
Collaborator

cb-heimdall commented Mar 1, 2026

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/2
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 2
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 2
2
1 if commit is unverified 0
Sum 2

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.

2 participants