Skip to content

ci: generate TypeScript types#3978

Merged
fadeev merged 3 commits intodevelopfrom
generate-typescript-types
Jun 18, 2025
Merged

ci: generate TypeScript types#3978
fadeev merged 3 commits intodevelopfrom
generate-typescript-types

Conversation

@fadeev
Copy link
Member

@fadeev fadeev commented Jun 13, 2025

Despite 11K changed lines, this is a one-liner PR that changes how TypeScript types are generated. This will allow frontends to leverage node's auto generated types to make interacting with API more safe.

For context, these types are published automatically to: https://www.npmjs.com/package/@zetachain/node-types

Summary by CodeRabbit

  • New Features
    • Introduced comprehensive TypeScript support for multiple modules, including new message types, enums, and service interfaces for authority, crosschain, emissions, fungible, ibccrosschain, lightclient, and observer functionalities.
    • Added schemas for message serialization, deserialization, and gRPC service descriptors for advanced querying and transaction operations.
  • Refactor
    • Upgraded code generation for TypeScript protobuf bindings, resulting in improved type safety and a modernized schema-based structure.
  • Chores
    • Removed various index declaration files that previously aggregated exports, streamlining module imports and exports.

@fadeev fadeev requested a review from a team as a code owner June 13, 2025 17:50
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 13, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

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.

📝 Walkthrough

Walkthrough

Updated buf plugin invocation to use the default/latest version and switched generation from declaration (dts) to TypeScript (ts). Added extensive new auto-generated protobuf TypeScript modules across zetachain packages. Removed legacy index.d.ts aggregator files.

Changes

Files Change summary
proto/buf.ts.yaml Removed fixed plugin version and switched plugin target from dts to ts.
typescript/.../crosschain/cross_chain_tx_pb.ts
typescript/.../emissions/params_pb.ts
Upgraded code generation from protoc-gen-es v1.x to v2.x, migrating class-based definitions to type-alias & schema-based API.
index.d.ts in authority, crosschain, emissions, fungible, ibccrosschain, lightclient, observer Deleted legacy declaration files that aggregated and re-exported protobuf modules.
typescript/zetachain/zetacore/authority/*.ts Added auto-generated protobuf TS modules (authorization, chain_info, genesis, policies, query, tx) with types, schemas, and services.
typescript/zetachain/zetacore/crosschain/*.ts Added new TS bindings for crosschain messages, events, gas_price, genesis, trackers, queries, flags, and tx with schema descriptors.
typescript/zetachain/zetacore/emissions/*.ts Added TS modules for emissions events, genesis, params, queries, tx, and withdrawable_emissions with schemas.
typescript/zetachain/zetacore/fungible/*.ts Added TS bindings for fungible module: events, foreign_coins, genesis, query, system_contract, tx with descriptors.
typescript/zetachain/zetacore/ibccrosschain/*.ts Added TS modules for ibc crosschain genesis, query, and tx—services defined (empty) with file descriptors.
typescript/zetachain/zetacore/lightclient/*.ts Added TS modules for lightclient: header_verification, chain_state, genesis, query, tx with schemas and services.
typescript/zetachain/zetacore/observer/*.ts Added TS definitions for observer ballots, blame, nonces, flags, events, genesis, keygen, accounts, params, and services with schemas.

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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: 4

♻️ Duplicate comments (1)
typescript/zetachain/zetacore/crosschain/genesis_pb.ts (1)

66-70: Duplicate: missing import for ZetaAccounting.
The type is referenced here but was incorrectly imported. See above.

🧹 Nitpick comments (5)
typescript/zetachain/zetacore/ibccrosschain/query_pb.ts (1)

19-21: Suppress or refine the empty service type.

The codegen output uses GenService<{}> which triggers a banned-type lint ({} means any non-null value). You can suppress this lint in generated files or configure the generator to emit a more precise empty interface (e.g. Record<string, never>).

🧰 Tools
🪛 Biome (1.9.4)

[error] 19-20: Don't use '{}' as a type.

Prefer explicitly define the object shape. '{}' means "any non-nullable value".

(lint/complexity/noBannedTypes)

typescript/zetachain/zetacore/ibccrosschain/tx_pb.ts (1)

20-21: Suppress or refine the empty RPC method type.

Similarly, the Msg service is typed as GenService<{}>, invoking the banned-type rule. Consider suppressing the lint in generated code or updating the codegen configuration to use an explicit empty interface (e.g. Record<string, never>).

🧰 Tools
🪛 Biome (1.9.4)

[error] 20-21: Don't use '{}' as a type.

Prefer explicitly define the object shape. '{}' means "any non-nullable value".

(lint/complexity/noBannedTypes)

typescript/zetachain/zetacore/crosschain/query_pb.ts (1)

396-403: Upper-case field names may break project linting

GasPrice?: GasPrice; (and similar LastBlockHeight, CrossChainTx, …) uses a Pascal-case property that will likely be flagged by standard ESLint/TSLint “camelcase” rules and may trip JSON serialisation that expects lower-case keys.

If your build enforces linting or you expose these messages via JSON, consider adding a small post-processing step in protoc-gen-es (or a plugin option) to down-case the first letter of generated field names.

Tagging as a suggestion only; safe to ignore if your tool-chain already whitelists these.

typescript/zetachain/zetacore/observer/params_pb.ts (1)

44-52: Flag deprecated field usage

confirmationCount is marked deprecated; prefer the richer confirmationParams (field 18). Update any hand-written code or tests that still assign/consume the old scalar.

typescript/zetachain/zetacore/fungible/query_pb.ts (1)

332-414: Consider tree-shaking strategy for giant service objects

The monolithic Query descriptor embeds all RPC metadata; bundle size can grow quickly. If frontend bundles ship this code, evaluate splitting services or using dynamic imports to avoid pulling in rarely-used endpoints.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9930615 and 510e3f6.

⛔ Files ignored due to path filters (57)
  • typescript/zetachain/zetacore/authority/authorization_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/authority/chain_info_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/authority/genesis_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/authority/policies_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/authority/query_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/authority/tx_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/crosschain/events_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/crosschain/gas_price_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/crosschain/genesis_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/crosschain/inbound_hash_to_cctx_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/crosschain/inbound_tracker_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/crosschain/last_block_height_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/crosschain/legacy_msgs_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/crosschain/outbound_tracker_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/crosschain/query_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/crosschain/rate_limiter_flags_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/crosschain/tx_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/emissions/events_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/emissions/genesis_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/emissions/query_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/emissions/tx_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/emissions/withdrawable_emissions_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/fungible/events_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/fungible/foreign_coins_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/fungible/genesis_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/fungible/query_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/fungible/system_contract_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/fungible/tx_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/ibccrosschain/genesis_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/lightclient/block_header_verification_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/lightclient/chain_state_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/lightclient/genesis_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/lightclient/query_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/lightclient/tx_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/observer/ballot_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/observer/blame_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/observer/chain_nonces_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/observer/confirmation_params_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/observer/crosschain_flags_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/observer/events_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/observer/genesis_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/observer/keygen_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/observer/node_account_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/observer/nonce_to_cctx_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/observer/observer_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/observer/operational_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/observer/params_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/observer/pending_nonces_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/observer/query_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/observer/tss_funds_migrator_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/observer/tss_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/observer/tx_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/pkg/coin/coin_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/pkg/crypto/crypto_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/pkg/proofs/bitcoin/bitcoin_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/pkg/proofs/ethereum/ethereum_pb.d.ts is excluded by !**/*_pb.d.ts
  • typescript/zetachain/zetacore/pkg/proofs/proofs_pb.d.ts is excluded by !**/*_pb.d.ts
📒 Files selected for processing (60)
  • proto/buf.ts.yaml (1 hunks)
  • typescript/zetachain/zetacore/authority/authorization_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/authority/chain_info_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/authority/genesis_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/authority/index.d.ts (0 hunks)
  • typescript/zetachain/zetacore/authority/policies_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/authority/query_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/authority/tx_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/crosschain/cross_chain_tx_pb.ts (7 hunks)
  • typescript/zetachain/zetacore/crosschain/events_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/crosschain/gas_price_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/crosschain/genesis_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/crosschain/inbound_hash_to_cctx_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/crosschain/inbound_tracker_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/crosschain/index.d.ts (0 hunks)
  • typescript/zetachain/zetacore/crosschain/last_block_height_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/crosschain/legacy_msgs_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/crosschain/outbound_tracker_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/crosschain/query_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/crosschain/rate_limiter_flags_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/crosschain/tx_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/emissions/events_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/emissions/genesis_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/emissions/index.d.ts (0 hunks)
  • typescript/zetachain/zetacore/emissions/params_pb.ts (4 hunks)
  • typescript/zetachain/zetacore/emissions/query_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/emissions/tx_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/emissions/withdrawable_emissions_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/fungible/events_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/fungible/foreign_coins_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/fungible/genesis_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/fungible/index.d.ts (0 hunks)
  • typescript/zetachain/zetacore/fungible/query_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/fungible/system_contract_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/fungible/tx_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/ibccrosschain/genesis_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/ibccrosschain/index.d.ts (0 hunks)
  • typescript/zetachain/zetacore/ibccrosschain/query_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/ibccrosschain/tx_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/lightclient/block_header_verification_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/lightclient/chain_state_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/lightclient/genesis_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/lightclient/index.d.ts (0 hunks)
  • typescript/zetachain/zetacore/lightclient/query_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/lightclient/tx_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/observer/ballot_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/observer/blame_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/observer/chain_nonces_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/observer/confirmation_params_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/observer/crosschain_flags_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/observer/events_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/observer/genesis_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/observer/index.d.ts (0 hunks)
  • typescript/zetachain/zetacore/observer/keygen_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/observer/node_account_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/observer/nonce_to_cctx_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/observer/observer_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/observer/operational_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/observer/params_pb.ts (1 hunks)
  • typescript/zetachain/zetacore/observer/pending_nonces_pb.ts (1 hunks)
💤 Files with no reviewable changes (7)
  • typescript/zetachain/zetacore/authority/index.d.ts
  • typescript/zetachain/zetacore/fungible/index.d.ts
  • typescript/zetachain/zetacore/ibccrosschain/index.d.ts
  • typescript/zetachain/zetacore/lightclient/index.d.ts
  • typescript/zetachain/zetacore/emissions/index.d.ts
  • typescript/zetachain/zetacore/observer/index.d.ts
  • typescript/zetachain/zetacore/crosschain/index.d.ts
🧰 Additional context used
🧬 Code Graph Analysis (15)
typescript/zetachain/zetacore/authority/chain_info_pb.ts (1)
typescript/zetachain/zetacore/pkg/chains/chains_pb.ts (1)
  • file_zetachain_zetacore_pkg_chains_chains (13-14)
typescript/zetachain/zetacore/crosschain/inbound_tracker_pb.ts (2)
typescript/zetachain/zetacore/pkg/coin/coin_pb.ts (1)
  • file_zetachain_zetacore_pkg_coin_coin (12-13)
pkg/contracts/sui/coin.go (1)
  • CoinType (4-4)
typescript/zetachain/zetacore/emissions/genesis_pb.ts (2)
typescript/zetachain/zetacore/emissions/params_pb.ts (1)
  • file_zetachain_zetacore_emissions_params (13-14)
typescript/zetachain/zetacore/emissions/withdrawable_emissions_pb.ts (1)
  • WithdrawableEmissions (19-29)
typescript/zetachain/zetacore/authority/authorization_pb.ts (1)
typescript/zetachain/zetacore/authority/policies_pb.ts (1)
  • file_zetachain_zetacore_authority_policies (13-14)
typescript/zetachain/zetacore/fungible/genesis_pb.ts (2)
typescript/zetachain/zetacore/fungible/foreign_coins_pb.ts (1)
  • file_zetachain_zetacore_fungible_foreign_coins (15-16)
typescript/zetachain/zetacore/fungible/system_contract_pb.ts (1)
  • file_zetachain_zetacore_fungible_system_contract (13-14)
typescript/zetachain/zetacore/fungible/foreign_coins_pb.ts (2)
typescript/zetachain/zetacore/pkg/coin/coin_pb.ts (1)
  • file_zetachain_zetacore_pkg_coin_coin (12-13)
pkg/contracts/sui/coin.go (1)
  • CoinType (4-4)
typescript/zetachain/zetacore/emissions/tx_pb.ts (1)
typescript/zetachain/zetacore/emissions/params_pb.ts (1)
  • file_zetachain_zetacore_emissions_params (13-14)
typescript/zetachain/zetacore/observer/node_account_pb.ts (1)
typescript/zetachain/zetacore/pkg/crypto/crypto_pb.ts (1)
  • file_zetachain_zetacore_pkg_crypto_crypto (13-14)
typescript/zetachain/zetacore/emissions/query_pb.ts (1)
typescript/zetachain/zetacore/emissions/params_pb.ts (1)
  • file_zetachain_zetacore_emissions_params (13-14)
typescript/zetachain/zetacore/observer/params_pb.ts (1)
typescript/zetachain/zetacore/observer/confirmation_params_pb.ts (1)
  • file_zetachain_zetacore_observer_confirmation_params (12-13)
typescript/zetachain/zetacore/crosschain/rate_limiter_flags_pb.ts (2)
typescript/zetachain/zetacore/pkg/coin/coin_pb.ts (1)
  • file_zetachain_zetacore_pkg_coin_coin (12-13)
pkg/contracts/sui/coin.go (1)
  • CoinType (4-4)
typescript/zetachain/zetacore/crosschain/cross_chain_tx_pb.ts (1)
typescript/zetachain/zetacore/pkg/coin/coin_pb.ts (1)
  • file_zetachain_zetacore_pkg_coin_coin (12-13)
typescript/zetachain/zetacore/fungible/events_pb.ts (2)
typescript/zetachain/zetacore/fungible/tx_pb.ts (1)
  • file_zetachain_zetacore_fungible_tx (16-17)
typescript/zetachain/zetacore/pkg/coin/coin_pb.ts (1)
  • file_zetachain_zetacore_pkg_coin_coin (12-13)
typescript/zetachain/zetacore/crosschain/legacy_msgs_pb.ts (5)
typescript/zetachain/zetacore/pkg/chains/chains_pb.ts (1)
  • file_zetachain_zetacore_pkg_chains_chains (13-14)
typescript/zetachain/zetacore/pkg/coin/coin_pb.ts (1)
  • file_zetachain_zetacore_pkg_coin_coin (12-13)
typescript/zetachain/zetacore/pkg/proofs/proofs_pb.ts (1)
  • file_zetachain_zetacore_pkg_proofs_proofs (17-18)
typescript/zetachain/zetacore/crosschain/rate_limiter_flags_pb.ts (1)
  • file_zetachain_zetacore_crosschain_rate_limiter_flags (15-16)
typescript/zetachain/zetacore/crosschain/cross_chain_tx_pb.ts (1)
  • file_zetachain_zetacore_crosschain_cross_chain_tx (15-16)
typescript/zetachain/zetacore/crosschain/tx_pb.ts (4)
typescript/zetachain/zetacore/pkg/coin/coin_pb.ts (1)
  • file_zetachain_zetacore_pkg_coin_coin (12-13)
typescript/zetachain/zetacore/pkg/proofs/proofs_pb.ts (1)
  • file_zetachain_zetacore_pkg_proofs_proofs (17-18)
typescript/zetachain/zetacore/crosschain/rate_limiter_flags_pb.ts (1)
  • file_zetachain_zetacore_crosschain_rate_limiter_flags (15-16)
typescript/zetachain/zetacore/crosschain/cross_chain_tx_pb.ts (1)
  • file_zetachain_zetacore_crosschain_cross_chain_tx (15-16)
🪛 Biome (1.9.4)
typescript/zetachain/zetacore/ibccrosschain/query_pb.ts

[error] 19-20: Don't use '{}' as a type.

Prefer explicitly define the object shape. '{}' means "any non-nullable value".

(lint/complexity/noBannedTypes)

typescript/zetachain/zetacore/ibccrosschain/tx_pb.ts

[error] 20-21: Don't use '{}' as a type.

Prefer explicitly define the object shape. '{}' means "any non-nullable value".

(lint/complexity/noBannedTypes)

⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: start-e2e-test / e2e
  • GitHub Check: build-and-test
  • GitHub Check: gosec
  • GitHub Check: build
  • GitHub Check: analyze (go)
🔇 Additional comments (77)
proto/buf.ts.yaml (1)

7-7: Validate downstream compatibility of target=ts.

Switching from dts to ts changes the output format to full TypeScript source modules. Ensure that consuming projects’ build configurations and import paths are updated to handle the new module patterns and file extensions.

typescript/zetachain/zetacore/crosschain/inbound_hash_to_cctx_pb.ts (1)

1-37: Auto-generated message schema looks correct.

The new InboundHashToCctx TypeScript binding aligns with the protobuf definition: imports, field types, and descriptors are all consistent.

typescript/zetachain/zetacore/observer/nonce_to_cctx_pb.ts (1)

1-49: Auto-generated message schema looks correct.

The NonceToCctx interface and its schema descriptor accurately reflect the proto message. Imports and descriptor references are consistent.

typescript/zetachain/zetacore/authority/chain_info_pb.ts (1)

1-39: Auto-generated file: no manual review required

This file is produced by protoc-gen-es from the .proto definitions; any adjustments should be made in the source .proto or generation settings rather than here.

typescript/zetachain/zetacore/emissions/genesis_pb.ts (1)

1-43: Auto-generated file: no manual review required

This module is generated by the protobuf toolchain. Please update the .proto spec or codegen config for any changes.

typescript/zetachain/zetacore/ibccrosschain/genesis_pb.ts (1)

1-30: Auto-generated file: no manual review required

All definitions are generated by protoc-gen-es; edits belong in the .proto definitions or generator parameters.

typescript/zetachain/zetacore/observer/pending_nonces_pb.ts (1)

1-49: Auto-generated file: no manual review required

This file is fully generated from the pending_nonces.proto schema. Adjustments should occur in the .proto or codegen config.

typescript/zetachain/zetacore/crosschain/last_block_height_pb.ts (1)

1-50: Auto-generated file: no manual review required

Generated by protoc-gen-es from last_block_height.proto; any fixes should be applied at the source .proto level.

typescript/zetachain/zetacore/lightclient/chain_state_pb.ts (1)

1-50: Generated protobuf binding – no manual changes required.
This file is auto-generated by protoc-gen-es v2.5.2 with target=ts and adheres to the expected structure, imports, and schema definitions.

typescript/zetachain/zetacore/crosschain/inbound_tracker_pb.ts (1)

1-44: Generated protobuf binding – no manual changes required.
This file is auto-generated by protoc-gen-es v2.5.2 with target=ts, correctly imports CoinType, and defines the InboundTracker schema.

typescript/zetachain/zetacore/fungible/genesis_pb.ts (1)

1-43: Generated protobuf binding – no manual changes required.
This file is auto-generated by protoc-gen-es v2.5.2 with target=ts, correctly references ForeignCoins and SystemContract types and exports the GenesisState schema.

typescript/zetachain/zetacore/emissions/withdrawable_emissions_pb.ts (1)

1-38: Generated protobuf binding – no manual changes required.
This file is auto-generated by protoc-gen-es v2.5.2 with target=ts, correctly defines the WithdrawableEmissions message type and schema.

typescript/zetachain/zetacore/observer/chain_nonces_pb.ts (1)

1-60: Generated protobuf binding – no manual changes required.
This file is auto-generated by protoc-gen-es v2.5.2 with target=ts, correctly defines the ChainNonces message (including the deprecated index field) and schema.

typescript/zetachain/zetacore/fungible/system_contract_pb.ts (1)

1-43: Generated Protobuf TS Definitions for Fungible Module Are Correct
The imports, message fields, and schema descriptor accurately reflect system_contract.proto and adhere to project conventions.

typescript/zetachain/zetacore/lightclient/genesis_pb.ts (1)

1-51: Generated Lightclient Genesis Protobuf Binding Is Valid
Imports, repeated fields, optional fields, and the message descriptor align precisely with the genesis.proto schema.

typescript/zetachain/zetacore/authority/genesis_pb.ts (1)

1-50: Authority Genesis Protobuf TS Definitions Look Good
The GenesisState type, related imports, and the file/message descriptors correctly model the authority/genesis.proto specification.

typescript/zetachain/zetacore/observer/confirmation_params_pb.ts (1)

1-58: Observer ConfirmationParams Binding Is Correct
Field mappings to uint64 as bigint, the file descriptor, and schema descriptor match the protobuf definition without issues.

typescript/zetachain/zetacore/observer/operational_pb.ts (1)

1-57: Observer OperationalFlags Protobuf Definitions Are Accurate
The OperationalFlags type, including Duration import and optional fields, aligns with the operational.proto contract.

typescript/zetachain/zetacore/crosschain/gas_price_pb.ts (1)

1-71: Skip review on generated protobuf binding
This file is auto-generated by protoc-gen-es targeting TypeScript; manual changes will be overwritten.

typescript/zetachain/zetacore/observer/keygen_pb.ts (1)

1-73: Skip review on generated protobuf binding
This file is auto-generated by protoc-gen-es targeting TypeScript; manual changes will be overwritten.

typescript/zetachain/zetacore/observer/genesis_pb.ts (1)

1-136: Skip review on generated protobuf binding
This file is auto-generated by protoc-gen-es targeting TypeScript; manual changes will be overwritten.

typescript/zetachain/zetacore/observer/blame_pb.ts (1)

1-70: Skip review on generated protobuf binding
This file is auto-generated by protoc-gen-es targeting TypeScript; manual changes will be overwritten.

typescript/zetachain/zetacore/fungible/foreign_coins_pb.ts (1)

1-87: Skip review on generated protobuf binding
This file is auto-generated by protoc-gen-es targeting TypeScript; manual changes will be overwritten.

typescript/zetachain/zetacore/crosschain/genesis_pb.ts (10)

1-4: Approve auto-generated header.
Standard protoc-gen-es header and ESLint disable directive are present.


27-29: Approve file descriptor declaration.
The file_zetachain_zetacore_crosschain_genesis declaration is correctly configured.


35-41: Approve outboundTrackerList field.
Naming follows lowerCamelCase and matches the proto definition.


41-45: Approve gasPriceList field.
Consistent with other repeated list fields.


51-55: Approve lastBlockHeightList field.
Consistent naming and type.


56-59: Approve inboundHashToCctxList field.
Naming and type are correct.


61-64: Approve inboundTrackerList field.
Consistent field definition.


76-80: Approve rateLimiterFlags field.
Naming aligns with conventions.


81-85: Approve counter field.
Primitive 64-bit integer is correctly represented as bigint.


91-93: Approve GenesisStateSchema export.
Schema descriptor is correctly initialized.

typescript/zetachain/zetacore/crosschain/outbound_tracker_pb.ts (4)

1-14: Approve auto-generated header and imports.
The file uses the standard protoc-gen-es header, ESLint disable, and correctly imports codegenv2 utilities and dependencies.


16-35: Approve TxHash message definition.
Fields txHash, txSigner, and deprecated proven are correctly typed and annotated.


44-69: Approve OutboundTracker message definition.
Fields index, chainId, nonce, and hashList are properly defined with appropriate types.


41-43: Approve schema exports.
The TxHashSchema and OutboundTrackerSchema are correctly registered.

Also applies to: 75-77

typescript/zetachain/zetacore/authority/authorization_pb.ts (4)

1-10: Approve file header and imports.
Standard generation header and correct imports for codegenv2 and policy dependencies.


18-38: Approve Authorization message definition.
Fields msgUrl and authorizedPolicy map correctly to proto, with proper enum reference.


47-57: Approve AuthorizationList message definition.
Repeated authorizations array is defined correctly.


44-46: Approve schema exports.
AuthorizationSchema and AuthorizationListSchema are properly exported.

Also applies to: 63-65

typescript/zetachain/zetacore/observer/observer_pb.ts (5)

1-9: Approve auto-generated header and imports.
File correctly imports enums and message descriptors.


19-24: Approve ObserverSet message.
observerList typed as string array, matching proto.


33-41: Approve LastObserverCount message.
Fields count and lastChangeHeight correctly represent uint64 and int64.


58-63: Approve ObservationType enum.
Enum values and schema descriptor are correctly declared.


94-99: Approve ObserverUpdateReason enum.
Enum and schema descriptor definitions look correct.

Also applies to: 114-116

typescript/zetachain/zetacore/lightclient/block_header_verification_pb.ts (4)

1-9: Approve header and imports.
Standard auto-generated header with correct dependencies.


17-32: Approve HeaderSupportedChain message.
Fields chainId and enabled are properly typed.


42-49: Approve BlockHeaderVerification message.
Repeated headerSupportedChains is correctly represented.


38-40: Approve schema exports.
HeaderSupportedChainSchema and BlockHeaderVerificationSchema registrations are correct.

Also applies to: 55-57

typescript/zetachain/zetacore/lightclient/query_pb.ts (1)

1-357: Approve auto-generated gRPC query client

This file is produced by protoc-gen-es v2.5.2 targeting TypeScript and correctly defines query request/response types and the Query service descriptor with proper imports and deprecation annotations. No manual edits detected.

typescript/zetachain/zetacore/authority/policies_pb.ts (1)

1-102: Approve auto-generated authority policies bindings

The file adheres to the expected protoc-gen-es v2.5.2 TypeScript output, defining Policy, Policies, and PolicyType with accurate import paths and schema descriptors. No issues found.

typescript/zetachain/zetacore/crosschain/rate_limiter_flags_pb.ts (1)

1-115: Approve auto-generated crosschain rate limiter flags

This file correctly reflects the rate_limiter_flags.proto schema, with proper imports for CoinType and well-formed message descriptors. The generation matches project conventions.

typescript/zetachain/zetacore/emissions/tx_pb.ts (1)

1-114: Approve auto-generated emissions transaction bindings

The MsgWithdrawEmission and MsgUpdateParams messages and the Msg service conform to the proto definitions, with correct imports of Params and standard serviceDesc invocation.

typescript/zetachain/zetacore/lightclient/tx_pb.ts (1)

1-113: Approve auto-generated lightclient transaction bindings

The message types for EnableHeaderVerification and DisableHeaderVerification and the Msg service are consistent with the proto spec, and imports are properly resolved.

typescript/zetachain/zetacore/observer/node_account_pb.ts (1)

5-10: Auto-generated file – no action required

Generated imports look correct; no manual changes recommended.

typescript/zetachain/zetacore/crosschain/cross_chain_tx_pb.ts (1)

1-16: Generated artefact acknowledged

No issues spotted in the header / import block.

typescript/zetachain/zetacore/observer/ballot_pb.ts (1)

5-10: Generated artefact acknowledged

Imports are wired correctly; nothing to amend.

typescript/zetachain/zetacore/emissions/query_pb.ts (1)

5-13: Generated artefact acknowledged

Header and imports compile; no changes needed.

typescript/zetachain/zetacore/observer/crosschain_flags_pb.ts (1)

1-17: Confirm compiler target supports BigInt & es2020 libs

The generated code relies on bigint primitives and Duration helpers; make sure tsconfig.json includes target: "ES2020" (or newer) and "lib": ["es2020","dom"] to avoid build-time type errors in consumer projects.

typescript/zetachain/zetacore/emissions/params_pb.ts (1)

1-15: LGTM – generated schema aligned with v2 runtime

typescript/zetachain/zetacore/emissions/events_pb.ts (1)

115-125: Enum values verified

EmissionType namespace correctly mirrors proto enum. No action needed.

typescript/zetachain/zetacore/authority/query_pb.ts (1)

1-218: Skip autogenerated code inspection.

This file is entirely generated by protoc-gen-es v2.5.2 targeting TypeScript. No manual review is necessary for generated bindings.

typescript/zetachain/zetacore/observer/events_pb.ts (1)

1-195: Skip autogenerated code inspection.

This file is entirely generated by protoc-gen-es v2.5.2. Auto-generated protobuf bindings do not require manual review.

typescript/zetachain/zetacore/authority/tx_pb.ts (1)

1-276: Skip autogenerated code inspection.

This file is fully generated by protoc-gen-es v2.5.2. No manual review needed for generated service and message descriptors.

typescript/zetachain/zetacore/fungible/tx_pb.ts (1)

1-591: Skip autogenerated code inspection.

This file is entirely generated by protoc-gen-es v2.5.2. Auto-generated code changes should not be manually reviewed.

typescript/zetachain/zetacore/crosschain/events_pb.ts (1)

1-373: Skip autogenerated code inspection.

This file is fully generated by protoc-gen-es v2.5.2. No manual comments needed on generated protobuf types.

typescript/zetachain/zetacore/fungible/events_pb.ts (3)

5-11: Imports are correctly generated
The import paths for @bufbuild/protobuf, the local tx_pb and coin_pb modules, and the gogo_pb descriptor align with the project's structure.


16-17: File descriptor initialization is accurate
The fileDesc invocation matches the Protobuf definition and package metadata.


19-335: Skip auto-generated message schemas
All message types and schema definitions are produced by protoc-gen-es v2.5.2; manual edits are not required.

typescript/zetachain/zetacore/crosschain/tx_pb.ts (4)

5-14: Imports cover all dependencies
The generated imports for service, message, and file descriptors (@bufbuild/protobuf), along with external protobuf files (chains_pb, coin_pb, proofs_pb, rate_limiter_flags_pb, cross_chain_tx_pb, cosmos/msg/v1/msg_pb), are consistent and correctly referenced.


24-26: File descriptor setup is correct
fileDesc invocation accurately represents the crosschain/tx.proto file and package.


905-1028: RPC service definition is properly generated
The Msg service with its RPC methods matches the Protobuf service definition, with correct method kinds and input/output schemas.


27-904: Skip auto-generated message definitions
All message types are generated by protoc-gen-es v2.5.2; no manual changes are required.

typescript/zetachain/zetacore/crosschain/legacy_msgs_pb.ts (3)

5-17: Imports are aligned with legacy generation
The imports for fileDesc, messageDesc, cosmos/msg/v1/msg_pb, gogoproto/gogo_pb, and dependencies on chains_pb, coin_pb, proofs_pb, rate_limiter_flags_pb, and cross_chain_tx_pb are correct for legacy message compatibility.


22-24: Legacy file descriptor is correctly declared
fileDesc invocation accurately reflects the legacy_msgs.proto definition and package.


25-360: Skip auto-generated legacy message schemas
The legacy message definitions are generated for codec compatibility; no manual modifications are necessary.

@lumtis lumtis added the no-changelog Skip changelog CI check label Jun 16, 2025
Copy link
Contributor

@lumtis lumtis left a comment

Choose a reason for hiding this comment

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

LGTM, will not affect any protocol services

@fadeev fadeev added this pull request to the merge queue Jun 18, 2025
Merged via the queue into develop with commit 4f24176 Jun 18, 2025
47 checks passed
@fadeev fadeev deleted the generate-typescript-types branch June 18, 2025 12:28
lumtis pushed a commit that referenced this pull request Jul 2, 2025
github-merge-queue bot pushed a commit that referenced this pull request Jul 9, 2025
* add empty test dapp

* add test

* generate

* update gomod

* fix imports

* smaller message

* fix size

* ci: generate TypeScript types (#3978)

* test: lower Bitcoin E2E deposit tx fee to make nightly test cheaper (#3989)

lower Bitcoin E2E deposit test tx fee

* test: add connector fund migration e2e test using contracts only  (#3976)

* update go mod

* add a new message for migrating funds

* add migrate funds to e2e

* rebase from develop

* add v2 e2e test to check flow

* add zeta gateway deposit to zetaclient

* add github workflow

* update comments

* fix code formating

* fix code formating

* fix code formating

* fix unit tests

* fix unit tests

* revert to old command to start e2e test

* remove message for migration and refactor to using contract directly

* add changelog

* generate files after removing new message

* update generated files

* update generated files

* resolve comments 1

* remove v2 from naming

* generate files

* chore: fix some comments (#3993)

Signed-off-by: yingshanghuangqiao <yingshanghuangqiao@foxmail.com>

* feat(ton): integrate new functionality (#3977)

* Add ton.call operation

* vote inbound call

* update ton's gateway code

* e2e: ton_to_zevm_call

* Add increaseSeqno parsing

* ton: signer: increase_seqno integration

* ton: observer: increase_seqno integration

* Fix bugs. E2E for increase_seqno

* Update changelog

* Address PR comments

* Simplify inbound voting

* outbounds: validate nonce & simplify code

* bump gw

* refactor: update generated files (#4000)

update generated files

* ci: run simualtion tests nightly (#3999)

* update sim.yml

* add changelog

* update generated files

* generate

* add test for deposit with big payload

* generate

* update contract version

* try removing test

* fix wrong method called

* remove redundant log

* generate

* add version condition

---------

Signed-off-by: yingshanghuangqiao <yingshanghuangqiao@foxmail.com>
Co-authored-by: Denis Fadeev <denis@fadeev.org>
Co-authored-by: Charlie Chen <34498985+ws4charlie@users.noreply.github.com>
Co-authored-by: Tanmay <tanmay@zetachain.com>
Co-authored-by: yingshanghuangqiao <yingshanghuangqiao@foxmail.com>
Co-authored-by: Dmitry S <11892559+swift1337@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog Skip changelog CI check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants