Kale-Or-Fail: Batched Tx on OZ Relayers - #69
Conversation
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
…ong rounds, stats tracking, visual fx
There was a problem hiding this comment.
💡 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".
| 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"; |
There was a problem hiding this comment.
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 👍 / 👎.
| shouldRetry: (error: any) => { | ||
| // Intelligent default: Retry on network/server errors, fail on client logic | ||
| const msg = String(error?.message || error || "").toLowerCase(); | ||
|
|
There was a problem hiding this comment.
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 👍 / 👎.
| const txBuilder = new TransactionBuilder(sourceAccount, { | ||
| fee: "10000000", // 1 XLM max fee | ||
| networkPassphrase: Networks.PUBLIC | ||
| }); |
There was a problem hiding this comment.
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 👍 / 👎.
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
Security Implementation
.env(BATCH_DEPLOYER_MNEMONIC) to prevent source leaks.Hygiene Pass
pnpm check) and build integrity (pnpm build).labs-game-mechanicsskill for future architectural reference.