-
Notifications
You must be signed in to change notification settings - Fork 28
refactor(cosmwasm): use TS mainProcessor #1025
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
7 files reviewed, 3 comments
isi8787
reviewed
Sep 19, 2025
nbayindirli
reviewed
Sep 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: title to chore(cosmwasm): use TS mainProcessor
…t in case of errors
Co-authored-by: Noah B. 🥂 <[email protected]>
nbayindirli
approved these changes
Sep 23, 2025
Co-authored-by: Noah B. 🥂 <[email protected]>
Co-authored-by: Noah B. 🥂 <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
why?
To reduce the code boilerplate and make one more step towards uniform TS-driven script environment. This is a follow-up PR (it's optional from the main task perspective).
how?
By removing redundant mainprocessor methods and use the new TS one instead.
testing
Greptile Summary
Updated On: 2025-09-17 13:28:44 UTC
This PR refactors CosmWasm scripts to use a new TypeScript-based
mainProcessor
function instead of individual JavaScript implementations. The changes are part of a broader initiative to create a "uniform TS-driven script environment" and reduce code duplication across the codebase.The refactoring involves removing local
mainProcessor
implementations from six CosmWasm JavaScript files and migrating them to use a centralized TypeScript processor located incosmwasm/processor.ts
. This new processor handles common operations like configuration loading, wallet preparation, client setup, and configuration saving through aConfigManager
class, eliminating the need for each script to implement these repetitive tasks.The migration updates function signatures across the affected scripts to match the new processor's interface, typically changing from
(client, config, args, options)
to(client, wallet, config, options, args, fee)
. The changes also remove various utility functions likegetProposalConfig
,initContractConfig
, and hardcoded constants likegovernanceAddress
that have been moved to the new TypeScript configuration management system.Important Files Changed
Changed Files
Confidence score: 1/5
cosmwasm/query.js
andcosmwasm/submit-proposal.js
require immediate attention as they reference undefined functionsSequence Diagram