Skip to content

test(futarchy): settle gated-DAO proposals through gated_invoke - #495

Open
metapileks wants to merge 1 commit into
developfrom
pileks/gated-mint-decision-settlement
Open

metapileks wants to merge 1 commit into
developfrom
pileks/gated-mint-decision-settlement

Conversation

@metapileks

@metapileks metapileks commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

Adds an integration test showing that a gated-mint DAO's proposal settles through gated_invoke while amm_base_vault and the base conditional vault's underlying account are frozen.

Additionally, FutarchyClient.conditionalSwapIx now passes trader as the signer account instead of letting Anchor default it to the provider wallet. No existing caller passes a non-wallet trader, but this will allow conditional swaps of gated-mint decision markets.

Greptile Summary

This PR enables conditional swaps to resolve the explicitly supplied trader account and adds integration coverage for settling gated-mint proposals through gated_invoke.

  • Passes trader explicitly when constructing conditional-swap instructions.
  • Adds shared test support for pumping a proposal’s pass market.
  • Verifies both finalization and council cancellation while relevant gated-token accounts remain frozen.
  • Advances the SDK prerelease version to 0.1.1-alpha.2.

Confidence Score: 5/5

The PR appears safe to merge, with the production account-mapping change matching the instruction contract and the new tests exercising valid signer and gated-invocation paths.

No actionable failures remain; the explicit trader mapping is consistent with account derivation and signer requirements, while the transaction and test helpers satisfy their current callers’ authorization, timing, and account-loading needs.

Important Files Changed

Filename Overview
sdk/src/futarchy/v0.6/FutarchyClient.ts Explicitly maps the selected trader into conditional-swap accounts, consistent with its signer account schema and trader-owned token accounts.
tests/futarchy/integration/gatedProposalSettlement.test.ts Adds end-to-end coverage for finalizing and administratively cancelling gated-mint proposals through a versioned gated invocation.
tests/utils.ts Adds a pass-market pumping helper calibrated to the standard test DAO and used by the new integration suite.
tests/futarchy/main.test.ts Registers the gated proposal settlement integration suite in the existing futarchy test collection.
sdk/package.json Advances the SDK alpha package version without requiring updates to other repository metadata.

Reviews (1): Last reviewed commit: "test(futarchy): settle gated-DAO proposa..." | Re-trigger Greptile

@metapileks metapileks self-assigned this Sep 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Repository Guard

  • Cargo.lock: pass
  • yarn.lock (sdk): pass
  • yarn.lock (root): 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: pass
  • No suspicious changes to program IDs, error enums, or sensitive files detected.

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.

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