Skip to content

Make DeploymentTransactionArgs fields and module public#2461

Open
findolor wants to merge 3 commits intomainfrom
2026-02-16-pub-deployment-args
Open

Make DeploymentTransactionArgs fields and module public#2461
findolor wants to merge 3 commits intomainfrom
2026-02-16-pub-deployment-args

Conversation

@findolor
Copy link
Collaborator

@findolor findolor commented Feb 16, 2026

Motivation

Needed for external access to DeploymentTransactionArgs fields in downstream consumers.

See: ST0x-Technology/st0x.rest.api#36

Solution

  • Made all fields of DeploymentTransactionArgs struct public (approvals, deployment_calldata, orderbook_address, chain_id, emit_meta_call)
  • Changed order_operations module visibility from private to public in gui/mod.rs

Checks

By submitting this for review, I'm confirming I've done the following:

  • made this PR as small as possible
  • unit-tested any new functionality
  • linked any relevant issues or PRs
  • included screenshots (if this involves a front-end change)

Summary by CodeRabbit

  • Refactor
    • Expanded public API access for order operations and deployment functionality, enabling direct access to transaction parameters and configuration options for improved integration capabilities and extensibility.

@findolor findolor self-assigned this Feb 16, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 16, 2026

Walkthrough

Two files were modified to increase the visibility of the order_operations module and its struct fields. The order_operations module was made public, and five fields of DeploymentTransactionArgs were made public to enable external access via wasm bindings.

Changes

Cohort / File(s) Summary
Module visibility
crates/js_api/src/gui/mod.rs
Changed order_operations module from private to public.
Struct field visibility
crates/js_api/src/gui/order_operations.rs
Made five fields of DeploymentTransactionArgs public: approvals, deployment_calldata, orderbook_address, chain_id, and emit_meta_call.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: making DeploymentTransactionArgs fields and the order_operations module public.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 2026-02-16-pub-deployment-args

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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@crates/js_api/src/gui/mod.rs`:
- Line 39: The current pub mod order_operations; exposes every public item in
that module (e.g., DeploymentTransactionArgs, CalldataFunction, VaultAndDeposit,
TokenAllowance, and all calldata result types); if you only intend to expose
DeploymentTransactionArgs and a few related types, make the module private
(remove the pub) and re-export only the needed symbols from this file via pub
use order_operations::{DeploymentTransactionArgs, ExtendedApprovalCalldata,
ExternalCall} (adjust names to the exact types you need) so downstream consumers
only see the intended API; if full exposure was intended, keep the pub mod
as-is.

mod deposits;
mod field_values;
mod order_operations;
pub mod order_operations;
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Consider whether exposing the entire module is intentional.

Making order_operations public exposes all pub items within it — not just DeploymentTransactionArgs, but also CalldataFunction, VaultAndDeposit, TokenAllowance, and all the calldata result types. If the goal is only to expose DeploymentTransactionArgs and its related types for downstream consumers, a narrower approach would be to re-export specific items from mod.rs:

mod order_operations;
pub use order_operations::{DeploymentTransactionArgs, ExtendedApprovalCalldata, ExternalCall};

If full module exposure is intended for the downstream REST API, then the current approach is fine.

🤖 Prompt for AI Agents
In `@crates/js_api/src/gui/mod.rs` at line 39, The current pub mod
order_operations; exposes every public item in that module (e.g.,
DeploymentTransactionArgs, CalldataFunction, VaultAndDeposit, TokenAllowance,
and all calldata result types); if you only intend to expose
DeploymentTransactionArgs and a few related types, make the module private
(remove the pub) and re-export only the needed symbols from this file via pub
use order_operations::{DeploymentTransactionArgs, ExtendedApprovalCalldata,
ExternalCall} (adjust names to the exact types you need) so downstream consumers
only see the intended API; if full exposure was intended, keep the pub mod
as-is.

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