Skip to content

Kale-Or-Fail: Batched Tx on OZ Relayers - #69

Merged
kalepail merged 51 commits into
kalepail:nootfrom
tacticalnoot:main
Jan 30, 2026
Merged

Kale-Or-Fail: Batched Tx on OZ Relayers#69
kalepail merged 51 commits into
kalepail:nootfrom
tacticalnoot:main

Conversation

@tacticalnoot

@tacticalnoot tacticalnoot commented Jan 30, 2026

Copy link
Copy Markdown

Kale-Or-Fail: Batched Transactions

This PR implements the core game loop for Kale-Or-Fail, featuring a custom Soroban batch transfer contract that settles game sessions in efficient chunks via OpenZeppelin Relayers.

Key Features

  • Batched Settlement: Relies on a new Soroban contract to batch multiple KALE tips into a single transaction (1 signature = N tips).
  • OZ Relayer Integration: Seamlessly integrates with OpenZeppelin Relayers for gas sponsorship and reliable submission.
  • Game Mechanics: Implements "Swipe to Tip" logic, 3D card stack effects, confetti/toast notifications, and persistent stats tracking.

Security Implementation

  • Deployer Wallet: Shifted credentials to .env (BATCH_DEPLOYER_MNEMONIC) to prevent source leaks.
  • Auth Safety: Added rigorous checks to prevent unauthorized deployments or empty admin keys.

Hygiene Pass

  • Clean Build: Verified type safety (pnpm check) and build integrity (pnpm build).
  • Docs: Added labs-game-mechanics skill for future architectural reference.

claude and others added 30 commits January 28, 2026 16:36
Remove prompt text from og:description meta tag so shared links only
show song title + "Made with Smol AI Music Generator" instead of
revealing the user's creative prompt.

https://claude.ai/code/session_01Kf8zW5oSoPZXsQgMKtWTbN
Contract: CAZ4E2ZSMWMJDZQWB2OLXHYISBN6VSWUV2GOUM7AQ4ZDM4KBWHGKLDKX
WASM Hash: ad81fc06b4932efe64d2915cb5068d687116339e023a99ec6c6116aa95c74fbb
@tacticalnoot tacticalnoot changed the title chore: hygiene pass and secure credentials Kale-Or-Fail: Batched Tx on OZ Relayers Jan 30, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 457f7583f6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/derive-keys.mjs
Comment on lines +2 to +4
import { Mnemonic } from '@stellar/stellar-sdk';

const phrase = "share shadow nature eagle deer estate actor text bike guilt cake joke enough correct miss course viable phrase sniff route diagram drink biology airport";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Remove hardcoded mnemonic from repo

This script commits a full mnemonic phrase directly in source control; if this corresponds to the deployer wallet mentioned in the PR, anyone with repo access can derive the secret key and drain funds. Even if it’s “just for local derivation,” the secret is now in git history and downstream builds. Please load the phrase from an env var or prompt it at runtime and keep it out of the repo.

Useful? React with 👍 / 👎.

Comment thread src/utils/retry.ts
Comment on lines +17 to +20
shouldRetry: (error: any) => {
// Intelligent default: Retry on network/server errors, fail on client logic
const msg = String(error?.message || error || "").toLowerCase();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Make retry logic handle relayer error objects

The default retry predicate only inspects error.message, but send() throws plain objects with status/text (see src/utils/passkey-kit.ts), so msg becomes "[object Object]" and withRetry immediately aborts. In KaleOrFailCore this means 500/503 relayer errors won’t be retried even though the UI shows retry status. Consider checking error.status/error.text or stringifying the object before matching.

Useful? React with 👍 / 👎.

Comment on lines +86 to +89
const txBuilder = new TransactionBuilder(sourceAccount, {
fee: "10000000", // 1 XLM max fee
networkPassphrase: Networks.PUBLIC
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use configured network passphrase for batch transfers

The batch transfer builder hardcodes Networks.PUBLIC, while the rest of the app (PasskeyKit, RPC config) uses PUBLIC_NETWORK_PASSPHRASE. If this is run against testnet or a local dev network, the transaction will be built/signed for the wrong network and will fail simulation or submission. Please use the configured network passphrase (or accept it as a parameter) to avoid environment-specific breakage.

Useful? React with 👍 / 👎.

@kalepail
kalepail merged commit 58ab7d3 into kalepail:noot Jan 30, 2026
1 check passed
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.

3 participants