Skip to content

Add workflow to transfer Batcher ownership (COINS-1281) - #371

Draft
kamleshmugdiya wants to merge 1 commit into
masterfrom
kamleshmugdiya/coins-1281-transfer-batcher-ownership-workflow
Draft

Add workflow to transfer Batcher ownership (COINS-1281)#371
kamleshmugdiya wants to merge 1 commit into
masterfrom
kamleshmugdiya/coins-1281-transfer-batcher-ownership-workflow

Conversation

@kamleshmugdiya

Copy link
Copy Markdown
Contributor

Summary

  • Adds scripts/transferBatcherOwnership.ts + .github/workflows/transfer_batcher_ownership.yaml, sending step 1 of the Ownable2Step handover (transferOwnership(newOwner)) as part of moving Batcher ownership to a TSS custody wallet.
  • Modeled directly on the existing updateTransferGasLimit.ts / update_transfer_gas_limit.yaml pair: same two-job preview → environment-gated run-transfer structure, same signer (index 2, PRIVATE_KEY_FOR_BATCHER_CONTRACT_DEPLOYMENT), same env-var wiring.
  • The new owner address is not a workflow input. Per design, it's a hardcoded constant (NEW_OWNER_ADDRESS in the script) set via reviewed PR, cross-checked at runtime against a BATCHER_NEW_OWNER_ADDRESS secret — the script aborts on any mismatch.

Why draft

NEW_OWNER_ADDRESS is intentionally left blank. DevOps is provisioning the TSS custody wallet (COINS-1280); once they hand back the base address and add it to the BATCHER_NEW_OWNER_ADDRESS GitHub secret, I'll fill in the constant, un-draft, and this is ready for review/merge.

Pre-flight / post-send checks in the script

  • Contract code exists at the target Batcher address
  • owner() == the signing key's address
  • NEW_OWNER_ADDRESS constant is set and matches BATCHER_NEW_OWNER_ADDRESS exactly
  • Target is a valid, non-zero address
  • After sending: reads back pendingOwner() and asserts it matches — this step is reversible (re-issuing transferOwnership replaces the pending transfer); only the subsequent acceptOwnership() (separate ticket, COINS-1282) is not.

Test plan

  • npx tsc --noEmit — no new type errors (pre-existing unrelated ignition-core .d.ts errors confirmed present on master too)
  • npx prettier --check on changed files — passes
  • Workflow YAML validated (parses correctly, workflow_dispatch inputs/jobs as expected)
  • npx hardhat test test/batcher.js — pre-existing HH8 config error reproduced identically on unmodified master (missing local .env secrets in this environment), confirmed unrelated to this change
  • Fill in NEW_OWNER_ADDRESS once DevOps provisions the wallet (COINS-1280)
  • Run against tmorpheth (testnet) manually via workflow_dispatch, verify pendingOwner() on-chain
  • Testnet validation gate (COINS-1318) before any mainnet run

Ref: TDD §6

🤖 Generated with Claude Code

Adds a script + GitHub workflow to send transferOwnership(newOwner) on
the Batcher contract as step 1 of the Ownable2Step handover to a TSS
custody wallet. Modeled on updateTransferGasLimit.ts / its workflow.

The new owner address is deliberately not a workflow input: it is a
hardcoded constant (left blank pending the wallet's base address from
DevOps) cross-checked at runtime against a BATCHER_NEW_OWNER_ADDRESS
secret, aborting on any mismatch.

NEW_OWNER_ADDRESS is intentionally left empty -- DevOps is still
provisioning the custody wallet. Fill it in once the base address is
available, then this is ready for review.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@linear-code

linear-code Bot commented Aug 5, 2026

Copy link
Copy Markdown

COINS-1281

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