Skip to content

Add composable dao action scripts for the admin approval flow - #481

Open
metapileks wants to merge 7 commits into
developfrom
pileks/admin-action-templates
Open

Add composable dao action scripts for the admin approval flow#481
metapileks wants to merge 7 commits into
developfrom
pileks/admin-action-templates

Conversation

@metapileks

@metapileks metapileks commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Adds reusable script utilities for routing DAO vault actions through the futarchy admin approval system, so one-off operational scripts can be composed from small building blocks instead of hand-rolling the Squads plumbing each time.

Greptile Summary

Adds composable utilities for routing DAO vault actions through futarchy admin approval.

  • Introduces lazy DAO and operational multisig transaction builders that obtain transaction indexes immediately before submission.
  • Adds reusable DAO actions for parameter updates, liquidity withdrawals, and token transfers.
  • Adds guarded operational-proposal retries while aborting on ambiguous send or confirmation failures.
  • Adds an example script for composing and submitting DAO actions.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
scripts/utils/adminApproval.ts Adds lazy builders for DAO and operational Squads proposals, addressing the previously reported stale-index windows.
scripts/utils/daoActions.ts Adds validated action builders and sequential submission logic that avoids retrying ambiguous enqueue outcomes.
scripts/utils/squads.ts Allows callers to select the Squads transaction creator while preserving the permissionless account as the default.
scripts/v0.6/enqueueTemplate.ts Adds a template demonstrating how to compose and submit admin-approved DAO actions.

Reviews (7): Last reviewed commit: "include any ambiguous sends to failure r..." | Re-trigger Greptile

@metapileks
metapileks requested a review from metanallok July 31, 2026 14:48
@metapileks metapileks self-assigned this Jul 31, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Repository Guard

  • Cargo.lock: pass
  • yarn.lock (root): pass
  • yarn.lock (sdk): pass
  • Repo guard: pass

Repository Guard

Cargo dependency pinning

  • Status: pass
  • Every programs/*/Cargo.toml dep uses =x.y.z, a path = .. workspace ref, or a git dep with a 40-char rev.

Cross-program Anchor/Solana version consistency

  • Status: pass
  • anchor-lang and anchor-spl are pinned to the version declared in repo-guard.toml across every program.

solana-program crate pin

  • Status: pass
  • Every solana-program = "=X" declaration is =1.17.14 (locked to match Cargo.lock).

Anchor.toml solana_version

  • Status: pass
  • Anchor.toml declares solana_version = "1.17.34" (local-dev install for anchor test).

Crate minimum age

  • Status: pass
  • All Cargo deps changed by this PR are at least 14 days old on crates.io.

Yarn package.json pinning

  • Status: pass
  • All package.json deps use exact versions (no ^, ~, ranges).

npm minimum age

  • Status: pass
  • All npm deps changed by this PR are at least 14 days old.

Workflow toolchain consistency

  • Status: pass
  • Every workflow declares anchor-version: 0.29.0.
  • Per-file solana-cli-version values match [toolchain.workflow_solana_cli] in repo-guard.toml.

GitHub Action SHA pinning

  • Status: pass
  • Every third-party action is pinned to a SHA in [actions.sha_allowlist].

Sensitive program / config changes

  • Status: warn
  • Review hint only (CODEOWNERS is the merge gate). Lines below match heuristics for security-sensitive changes:
  • scripts/utils/adminApproval.ts:19 Hardcoded Solana address literal -> + "8N3Tvc6B1wEVKVC6iD4s6eyaCNqX2ovj2xze2q3Q9DWH",

Overall status: pass

Lockfile freshness (Cargo.lock + yarn.lock) is checked by the workflow directly and cannot be bypassed. The sensitive-diff section is a review hint - CODEOWNERS handles the actual merge gate.

Comment thread scripts/utils/adminApproval.ts Outdated
Comment thread scripts/utils/daoActions.ts Outdated
Comment thread scripts/utils/adminApproval.ts Outdated
Comment thread scripts/utils/daoActions.ts
Comment thread scripts/utils/daoActions.ts
Comment thread scripts/utils/daoActions.ts
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