Skip to content

Conversation

@Azorlogh
Copy link
Contributor

@Azorlogh Azorlogh commented Dec 1, 2025

Summary by cubic

Adds transaction templates to ledger schemas and lets clients execute transactions by template ID. When a schema is active, transactions must use a template; without a schema, existing behaviors still work.

  • New Features

    • Schema supports transaction templates (id, description, script, runtime).
    • Templates are validated at schema update; invalid templates return ErrInvalidSchema.
    • CreateTransaction accepts script.template and vars; cannot mix with postings or plain numscript.
    • With a schema: template is required. Without a schema: postings or plain numscript still allowed.
    • OpenAPI/SDK/docs updated; storage now persists templates with the schema.
  • Migration

    • If using schemas: add templates under data.transactions and update clients to send script.template (+ vars). Do not send postings or ad‑hoc scripts.
    • If consuming UpdatedSchema events: transactions is now included in the payload.

Written for commit 4a8518f. Summary will update automatically on new commits.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 1, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/transaction_templates

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

2 participants