Skip to content
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

feat(spaceward): fix governance types #761

Merged
merged 2 commits into from
Sep 2, 2024
Merged

feat(spaceward): fix governance types #761

merged 2 commits into from
Sep 2, 2024

Conversation

alex-nax
Copy link
Contributor

@alex-nax alex-nax commented Sep 2, 2024

updated gov proto; fix governance types

Summary by CodeRabbit

  • New Features

    • Introduced a new RPC method Constitution for querying the chain's constitution.
    • Added new governance RPC methods: UpdateParams and CancelProposal.
    • Enhanced MsgSubmitProposal to include a field for submitting arbitrary messages.
  • Improvements

    • Improved error handling in metadata parsing for better fallback mechanisms.
    • Enhanced documentation across various governance protocol definitions for clarity.
    • Consolidated governance parameters into a single params field for better organization.
  • Deprecations

    • Marked several fields in GenesisState and other messages as deprecated, encouraging the use of new structures.

@alex-nax alex-nax requested a review from jjheywood September 2, 2024 10:19
Copy link

github-actions bot commented Sep 2, 2024

Hey @alex-nax and thank you for opening this pull request! 👋🏼

It looks like you forgot to add a changelog entry for your changes. Make sure to add a changelog entry in the 'CHANGELOG.md' file.

Copy link
Contributor

coderabbitai bot commented Sep 2, 2024

Walkthrough

Walkthrough

The changes involve modifications to governance-related files within the Cosmos SDK, including updates to hooks, utility functions, and protocol buffer definitions. Key alterations include renaming variables for better metadata handling, deprecating certain parameters, adding new fields for proposals, and enhancing documentation across multiple files. Additionally, new RPC methods and message types have been introduced to support governance operations, improving overall structure and clarity.

Changes

File Path Change Summary
spaceward/src/features/governance/hooks.ts Updated useGovernance hook to rename destructured variables from parseMetadata, introducing fallback mechanisms for description and name.
spaceward/src/features/governance/util.ts Modified parseMetadata function to change error handling, setting title and summary fields to empty strings on unexpected metadata format, reducing descriptive error information.
wardenjs/proto/cosmos/gov/module/v1/module.proto Introduced module.proto defining Module message type with fields for max_metadata_len and authority, facilitating governance module configuration.
wardenjs/proto/cosmos/gov/v1/genesis.proto Deprecated deposit_params, voting_params, and tally_params fields in GenesisState, introducing a new params field for consolidation and adding a constitution field for chain builders.
wardenjs/proto/cosmos/gov/v1/gov.proto Enhanced documentation for governance messages, added new fields to Proposal, TallyResult, and Vote messages, marked DepositParams, VotingParams, and TallyParams as deprecated, and introduced Params message for governance parameters.
wardenjs/proto/cosmos/gov/v1/query.proto Added Constitution RPC method to Query service, refined comments for clarity, marked several fields in QueryParamsResponse as deprecated, and introduced a new params field.
wardenjs/proto/cosmos/gov/v1/tx.proto Introduced new RPC methods UpdateParams and CancelProposal, updated MsgSubmitProposal to include new fields, and enhanced metadata for voting and deposit messages.
wardenjs/proto/cosmos/gov/v1beta1/genesis.proto Added import for amino/amino.proto, modified repeated fields to include (amino.dont_omitempty), enhancing serialization behavior.
wardenjs/proto/cosmos/gov/v1beta1/gov.proto Enhanced documentation for governance messages, updated custom types for fields, and added (amino.dont_omitempty) option to various fields.
wardenjs/proto/cosmos/gov/v1beta1/query.proto Refined comments for clarity, added (amino.dont_omitempty) = true option to response message fields, improving serialization behavior.
wardenjs/proto/cosmos/gov/v1beta1/tx.proto Renamed service to gov Msg service, added import for amino/amino.proto, and enhanced metadata for MsgSubmitProposal, MsgVote, and MsgDeposit messages.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant GovernanceModule
    participant ProposalService

    Client->>GovernanceModule: Submit Proposal
    GovernanceModule->>ProposalService: Process Proposal
    ProposalService-->>GovernanceModule: Proposal ID
    GovernanceModule-->>Client: Confirmation with Proposal ID
Loading

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

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>.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @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.

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 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.
Early access features: disabled

We are currently testing the following features in early access:

  • Anthropic claude-3-5-sonnet for code reviews: Anthropic claims that the new Claude model has stronger code understanding and code generation capabilities than their previous models. Note: Our default code review model was also updated late last week. Please compare the quality of the reviews between the two models by toggling the early access feature.

Note:

  • You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file.
  • Please join our Discord Community to provide feedback and report issues on the discussion post.

Copy link

vercel bot commented Sep 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
warden-help-center ⬜️ Ignored (Inspect) Visit Preview Sep 2, 2024 10:22am

@jjheywood jjheywood merged commit 911873b into main Sep 2, 2024
14 checks passed
@jjheywood jjheywood deleted the fix-governance branch September 2, 2024 10:28
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

Outside diff range, codebase verification and nitpick comments (2)
spaceward/src/features/governance/util.ts (1)

24-25: Consider providing informative error messages for better debugging and troubleshooting.

The changes remove the descriptive error information that was previously provided when parsing metadata fails. This may impact the clarity of error reporting and make it harder to identify the cause of the failure.

Consider restoring the previous behavior of providing informative error messages. For example:

-title: "", // "Unexpected metadata",
-summary: "", // hasKey("message", e) ? e.message : "No description",
+title: "Unexpected metadata",
+summary: hasKey("message", e) ? e.message : "No description",

Providing descriptive error messages can greatly aid in debugging and troubleshooting issues related to metadata parsing.

wardenjs/proto/cosmos/gov/v1/query.proto (1)

147-159: LGTM!

The changes in the QueryParamsResponse message type are a step towards a more streamlined approach in handling governance parameters. The deprecation of the individual parameter fields (voting_params, deposit_params, tally_params) and the introduction of the consolidated params field of type Params suggest that users should prefer using the new params field for accessing governance parameters.

This change improves the structure and usability of the governance parameters by consolidating them into a single field. It also aligns with the best practice of deprecating old fields and providing a new, more efficient alternative.

To further enhance the clarity and usability of the QueryParamsResponse message type, consider adding a comment above the params field to explicitly mention that it consolidates all the governance parameters and should be preferred over the deprecated fields.

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between c9a3383 and 89b1575.

Files ignored due to path filters (29)
  • wardenjs/src/codegen/cosmos/bundle.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/cosmos/gov/module/v1/module.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/cosmos/gov/v1/genesis.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/cosmos/gov/v1/gov.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/cosmos/gov/v1/query.lcd.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/cosmos/gov/v1/query.rpc.Query.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/cosmos/gov/v1/query.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/cosmos/gov/v1/tx.amino.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/cosmos/gov/v1/tx.registry.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/cosmos/gov/v1/tx.rpc.msg.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/cosmos/gov/v1/tx.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/cosmos/gov/v1beta1/genesis.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/cosmos/gov/v1beta1/gov.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/cosmos/gov/v1beta1/query.lcd.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/cosmos/gov/v1beta1/query.rpc.Query.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/cosmos/gov/v1beta1/query.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/cosmos/gov/v1beta1/tx.rpc.msg.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/cosmos/gov/v1beta1/tx.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/gogoproto/bundle.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/google/bundle.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/shield/bundle.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/slinky/bundle.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/tendermint/bundle.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/warden/bundle.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/warden/warden/v1beta3/events.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/warden/warden/v1beta3/key.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/warden/warden/v1beta3/keychain.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/warden/warden/v1beta3/signature.ts is excluded by !wardenjs/src/codegen/**
  • wardenjs/src/codegen/warden/warden/v1beta3/tx.ts is excluded by !wardenjs/src/codegen/**
Files selected for processing (11)
  • spaceward/src/features/governance/hooks.ts (1 hunks)
  • spaceward/src/features/governance/util.ts (1 hunks)
  • wardenjs/proto/cosmos/gov/module/v1/module.proto (1 hunks)
  • wardenjs/proto/cosmos/gov/v1/genesis.proto (1 hunks)
  • wardenjs/proto/cosmos/gov/v1/gov.proto (3 hunks)
  • wardenjs/proto/cosmos/gov/v1/query.proto (10 hunks)
  • wardenjs/proto/cosmos/gov/v1/tx.proto (5 hunks)
  • wardenjs/proto/cosmos/gov/v1beta1/genesis.proto (2 hunks)
  • wardenjs/proto/cosmos/gov/v1beta1/gov.proto (6 hunks)
  • wardenjs/proto/cosmos/gov/v1beta1/query.proto (10 hunks)
  • wardenjs/proto/cosmos/gov/v1beta1/tx.proto (4 hunks)
Additional context used
buf
wardenjs/proto/cosmos/gov/module/v1/module.proto

5-5: import "cosmos/app/v1alpha1/module.proto": file does not exist

(COMPILE)

Additional comments not posted (70)
wardenjs/proto/cosmos/gov/module/v1/module.proto (1)

8-19: LGTM!

The Module message definition looks good:

  • Follows the protocol buffer style guide.
  • Has clear comments explaining the purpose and default values of the fields.
  • Correctly uses the option declaration to set the Go import path.

The code changes are approved.

wardenjs/proto/cosmos/gov/v1beta1/genesis.proto (6)

16-17: LGTM!

The change to include (amino.dont_omitempty) = true for the deposits field is approved. It ensures that empty repeated fields are included in the serialized output, which is consistent with the updates made to other similar fields.


19-20: LGTM!

The change to include (amino.dont_omitempty) = true for the votes field is approved. It ensures that empty repeated fields are included in the serialized output, which is consistent with the updates made to other similar fields.


22-23: LGTM!

The change to include (amino.dont_omitempty) = true for the proposals field is approved. It ensures that empty repeated fields are included in the serialized output, which is consistent with the updates made to other similar fields.


24-25: LGTM!

The changes to the deposit_params field are approved:

  • Including (amino.dont_omitempty) = true is consistent with the updates made to other fields.
  • Updating the comment improves clarity without changing the core functionality.

26-27: LGTM!

The changes to the voting_params field are approved:

  • Including (amino.dont_omitempty) = true is consistent with the updates made to other fields.
  • Updating the comment improves clarity without changing the core functionality.

28-29: LGTM!

The changes to the tally_params field are approved:

  • Including (amino.dont_omitempty) = true is consistent with the updates made to other fields.
  • Updating the comment improves clarity without changing the core functionality.
wardenjs/proto/cosmos/gov/v1/genesis.proto (5)

20-28: Deprecation changes look good.

The deprecation of the deposit_params, voting_params, and tally_params fields in favor of the params field is approved. The deprecation messages provide clear guidance to use the params field instead.


29-32: Addition of the params field is approved.

The new params field consolidates all the parameters related to the x/gov module, enhancing the organization and clarity of the GenesisState message. The field is introduced with the appropriate version annotation.


33-39: Addition of the constitution field is approved.

The new constitution field allows chain builders to articulate their vision and ideals at genesis. The field is well-documented, and its immutability is clearly stated. The introduction of the field in cosmos-sdk 0.50 is appropriately noted.


Line range hint 1-19:


Line range hint 40-41:

spaceward/src/features/governance/hooks.ts (2)

47-47: LGTM!

The code changes are approved. The aliasing of summary and title as _summary and _title respectively, allows for a fallback mechanism in the returned object.


51-52: LGTM!

The code changes are approved. The fallback mechanism for description and name properties enhances the robustness of the hook by ensuring that if the parsed metadata does not provide values, the original proposal values are still utilized.

wardenjs/proto/cosmos/gov/v1beta1/tx.proto (6)

10-10: LGTM!

The code changes are approved.


14-17: LGTM!

The code changes are approved.


37-52: LGTM!

The code changes are approved.


59-60: LGTM!

The code changes are approved.


66-78: LGTM!

The code changes are approved.

Also applies to: 89-101


112-130: LGTM!

The code changes are approved.

wardenjs/proto/cosmos/gov/v1/query.proto (6)

15-17: LGTM!

The Constitution RPC method is a valuable addition to the Query service, enabling clients to query the chain's constitution. The method is correctly defined with its corresponding request and response message types.


61-61: LGTM!

The QueryConstitutionRequest message type is appropriately defined as the request type for the Query/Constitution RPC method. The empty message type correctly indicates that no parameters are required for the request.


64-66: LGTM!

The QueryConstitutionResponse message type is properly defined as the response type for the Query/Constitution RPC method. The constitution field of type string is suitable for returning the chain's constitution in the response.


44-44: LGTM!

The updated comment for the Deposit RPC method enhances clarity by accurately describing that the method queries single deposit information based on proposalID and depositAddr.


76-76: LGTM!

The updated comment for the proposal field in the QueryProposalResponse message type enhances clarity by accurately describing that the field represents the requested governance proposal.


188-188: LGTM!

The updated comment for the deposits field in the QueryDepositsResponse message type enhances clarity by accurately describing that the field represents the requested deposits.

wardenjs/proto/cosmos/gov/v1beta1/query.proto (11)

9-9: LGTM!

The addition of the Amino import is approved.


40-40: LGTM!

The updated comment provides better clarity on the functionality of the Deposit RPC method.


64-64: Verify the impact on clients.

The addition of the (amino.dont_omitempty) = true option to the proposal field ensures that it is always included in the serialized output, even if empty.

Please verify that this change does not break any existing clients that rely on the previous serialization behavior where empty fields were omitted.


88-89: LGTM!

The updated comment provides better clarity on the purpose of the proposals field. The addition of the repeated keyword to the field declaration is syntactically correct.


103-103: LGTM!

The updated comment provides better clarity on the purpose of the voter field in the QueryVoteRequest message.


109-110: Verify the impact on clients.

The updated comment provides better clarity on the purpose of the vote field.

However, the addition of the (amino.dont_omitempty) = true option to the vote field ensures that it is always included in the serialized output, even if empty.

Please verify that this change does not break any existing clients that rely on the previous serialization behavior where empty fields were omitted.


124-125: Verify the impact on clients.

The updated comment provides better clarity on the purpose of the votes field.

However, the addition of the (amino.dont_omitempty) = true option to the votes field ensures that it is always included in the serialized output, even if empty.

Please verify that this change does not break any existing clients that rely on the previous serialization behavior where empty fields were omitted.


141-145: Verify the impact on clients.

The addition of the (amino.dont_omitempty) = true option to the voting_params, deposit_params, and tally_params fields ensures that they are always included in the serialized output, even if empty.

Please verify that this change does not break any existing clients that rely on the previous serialization behavior where empty fields were omitted.


163-163: Verify the impact on clients.

The addition of the (amino.dont_omitempty) = true option to the deposit field ensures that it is always included in the serialized output, even if empty.

Please verify that this change does not break any existing clients that rely on the previous serialization behavior where empty fields were omitted.


177-178: Verify the impact on clients.

The updated comment provides better clarity on the purpose of the deposits field.

However, the addition of the (amino.dont_omitempty) = true option to the deposits field ensures that it is always included in the serialized output, even if empty.

Please verify that this change does not break any existing clients that rely on the previous serialization behavior where empty fields were omitted.


193-193: Verify the impact on clients.

The addition of the (amino.dont_omitempty) = true option to the tally field ensures that it is always included in the serialized output, even if empty.

Please verify that this change does not break any existing clients that rely on the previous serialization behavior where empty fields were omitted.

wardenjs/proto/cosmos/gov/v1/tx.proto (13)

11-12: LGTM!

The added import statements are necessary and serve the following purposes:

  • amino/amino.proto: Provides support for Amino encoding.
  • google/protobuf/timestamp.proto: Provides support for timestamp fields.

18-18: LGTM!

The added service option (cosmos.msg.v1.service) = true correctly indicates that the Msg service is a Cosmos SDK message service.


36-40: LGTM!

The UpdateParams RPC method is correctly added to the Msg service and serves the purpose of updating the x/gov module parameters. The method signature and documentation are appropriate.


42-45: LGTM!

The CancelProposal RPC method is correctly added to the Msg service and serves the purpose of canceling a governance proposal. The method signature and documentation are appropriate.


52-84: LGTM!

The updates to the MsgSubmitProposal message are correctly implemented and serve the following purposes:

  • The messages field allows for more complex interactions through the execution of arbitrary messages.
  • The title and summary fields provide more context for proposals.
  • The expedited field allows for expedited proposals.
  • The Amino encoding options ensure backwards compatibility.

97-97: LGTM!

The Amino encoding option (amino.name) = "cosmos-sdk/v1/MsgExecLegacyContent" is correctly added to the MsgExecLegacyContent message and provides a descriptive name for the message, aiding in its identification and usage within the SDK.


111-123: LGTM!

The updates to the MsgVote message are correctly implemented and serve the following purposes:

  • The Amino encoding option (amino.name) = "cosmos-sdk/v1/MsgVote" provides a descriptive name for the MsgVote message, aiding in its identification and usage within the SDK.
  • The metadata field allows for attaching arbitrary metadata to the vote, providing more flexibility.

132-144: LGTM!

The updates to the MsgVoteWeighted message are correctly implemented and serve the following purposes:

  • The Amino encoding option (amino.name) = "cosmos-sdk/v1/MsgVoteWeighted" provides a descriptive name for the MsgVoteWeighted message, aiding in its identification and usage within the SDK.
  • The metadata field allows for attaching arbitrary metadata to the weighted vote, providing more flexibility.

153-162: LGTM!

The updates to the MsgDeposit message are correctly implemented and serve the following purposes:

  • The Amino encoding option (amino.name) = "cosmos-sdk/v1/MsgDeposit" provides a descriptive name for the MsgDeposit message, aiding in its identification and usage within the SDK.
  • The cosmos.AddressString scalar type for the depositor field ensures that the field contains a valid Cosmos address string.

171-182: LGTM!

The MsgUpdateParams message is correctly implemented and serves the purpose of updating the x/gov module parameters. The message includes appropriate fields:

  • The authority field specifies the address that controls the module.
  • The params field specifies the parameters to update.

The message documentation is also clear and indicates that it is available since cosmos-sdk 0.47.


184-188: LGTM!

The MsgUpdateParamsResponse message is correctly implemented and serves the purpose of defining the response structure for executing a MsgUpdateParams message. The message documentation is clear and indicates that it is available since cosmos-sdk 0.47.


193-200: LGTM!

The MsgCancelProposal message is correctly implemented and serves the purpose of defining the request type for canceling a proposal. The message includes appropriate fields:

  • The proposal_id field specifies the unique ID of the proposal.
  • The proposer field specifies the account address of the proposer.

The message documentation is also clear and indicates that it is available since cosmos-sdk 0.50.


206-213: LGTM!

The MsgCancelProposalResponse message is correctly implemented and serves the purpose of defining the response structure for executing a MsgCancelProposal message. The message includes appropriate fields:

  • The proposal_id field specifies the unique ID of the proposal.
  • The canceled_time field specifies the time when the proposal is canceled.
  • The canceled_height field specifies the block height at which the proposal is canceled.

The message documentation is also clear and indicates that it is available since cosmos-sdk 0.50.

wardenjs/proto/cosmos/gov/v1beta1/gov.proto (10)

10-10: LGTM!

The import statement for amino/amino.proto is correct.


14-14: LGTM!

The (gogoproto.goproto_getters_all) option is set correctly to false.


36-36: LGTM!

The comment accurately describes the option field in the WeightedVoteOption message.


39-40: LGTM!

The comment accurately describes the weight field in the WeightedVoteOption message.


42-43: LGTM!

The (gogoproto.customtype) and (amino.dont_omitempty) options for the weight field are set correctly.


52-53: LGTM!

The (amino.name) option for the TextProposal message is set correctly to cosmos-sdk/TextProposal.


56-58: LGTM!

The comment accurately describes the title field in the TextProposal message.


69-80: LGTM!

The comments accurately describe the proposal_id, depositor, and amount fields in the Deposit message. The (amino.dont_omitempty) option for the amount field is set correctly.


87-122: LGTM!

The comments accurately describe the various fields in the Proposal message. The (amino.dont_omitempty) option is set correctly for the relevant fields.


Line range hint 129-152: LGTM!

The comments accurately describe the enum values of the ProposalStatus enum.

wardenjs/proto/cosmos/gov/v1/gov.proto (10)

11-11: LGTM!

The code change is approved.


31-35: LGTM!

The code changes are approved.


41-48: LGTM!

The code changes are approved.


53-110: LGTM!

The code changes are approved.


136-142: LGTM!

The code changes are approved.


149-161: LGTM!

The code changes are approved.


167-201: LGTM!

The code changes are approved.


203-270: LGTM!

The code changes are approved.


87-110: Verify the usage of the new fields added to the Proposal message in the codebase.

Ensure that the new fields title, summary, proposer, expedited, and failed_reason added to the Proposal message are being used correctly in other parts of the codebase.

Run the following script to verify the usage of the new fields:


167-201: Verify the usage of the deprecated messages in the codebase.

Ensure that the deprecated DepositParams, VotingParams, and TallyParams messages are not being used in other parts of the codebase.

Run the following script to verify the usage of the deprecated messages:


package cosmos.gov.module.v1;

import "cosmos/app/v1alpha1/module.proto";
Copy link
Contributor

Choose a reason for hiding this comment

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

Fix the missing import file.

The static analysis tool flags that the imported file cosmos/app/v1alpha1/module.proto does not exist. This will cause compilation errors.

Please ensure that the imported file exists at the specified path. If you need assistance with this, I can help you locate the correct file or open a GitHub issue to track this task. Let me know if you would like me to assist further.

Tools
buf

5-5: import "cosmos/app/v1alpha1/module.proto": file does not exist

(COMPILE)

mn13 pushed a commit that referenced this pull request Sep 3, 2024
mn13 added a commit that referenced this pull request Sep 5, 2024
…dd-genesis-space (#723)

* validate bench32 in cmd
add-genesis-keychain
add-genesis-space

* in executeAnalyzers return error on bad contract address (#716)

* in executeAnalyzers return error on bad contract address

* update changelog

* validate bench32 in cmd
add-genesis-keychain
add-genesis-space

* fix spelling and duplicates

* * Added KeybaseId, Url and Name fields to keychain

* Added changelog

* Review comments

* Code review fixes

* Regenerated model

---------

Co-authored-by: Archie <artur.abliazimov@gmail.com>

* Fix of localnet.just (#726)

* Fixed localnet.just

* Fixed localnet.just

* Remove the GMP default params from genesis (#727)

* feat(faucet): new faucet (#479)

* feat(faucet): new faucet

This version of the Faucet does not have any limitations per user, only
limitations are daily token supply

* fix: minor css changes for mobile

* fix(faucet): add daily refresh and token refresh job

* fix(faucet): fix bugs and ci

* fix(faucet): remove unnessary go.mod files, replace dockerfile faucet-v2

* chore(faucet): remove unnessary variables and modify types

this will modify the types of DailyLimit and Batchinterval to remove
unnessary conversions and remove Cooldown and BatchInterval

* fix(faucet): acquire a lock when setting the new supply

* fix(faucet): removed locking where it's not needed

other enhancements as well, the loading and setting context to correct
place

* fix(faucet): converted background to much smaller image

* feat(faucet): make the run out of daily nicer

* feat(faucet): add new style

* feat(faucet): add check that same address cannot be multiple time in one batch

* feat(faucet): add metrics

* fix(faucet): Dockerfile libwasmvm was missing access rights

* feat(faucet): add pre input option to address form

---------

Co-authored-by: Jon Heywood <94459819+jjheywood@users.noreply.github.com>

* chore(wardend): bump ibc-go to v8.4.0

* docs: Update Keychain SDK (#706)

* Upgrade keychain docs

Update go version

Update json for keychain-fees

Update chain-id

* Add categorization to Keychain SDK

* Categorization

* Add Keychain SDK + Description

* Create a new tutorial

Add basic info for keychain

Implement main func with - handleKeyRequest and handleSignRequest

Write test function

* fixed a link in the Tools menu

* quick fixes

* quick fixes

* quick fixes

* remove )

---------

Co-authored-by: Margarita Skomorokh <ijonele@gmail.com>

* fixed links to the keychain sdk (#733)

* Made KeychainFees = nil invalid

* ci: add check to ensure go.mod is tidy

* chore: go mod tidy

* fix(wardend): ICAHostKeeper initialization requires QueryRouter to be set

Breaking change introduced in ibc-go v8.3

* feat(spaceward): key creation in sidebar (#728)

* fix key icon in sidebar

cleanup

* fix getProider call

* bump ethers version; fix erc20 send

* build: use new justfile commands

* fix(x/warden): make KeychainFees non-nullable

* fix(x/warden): allow empty KeychainFees

* cosmoshubtestnet hotfix; do not fail on wrong message type (#746)

* feat(faucet): configurable chain name (#747)

this change adds configurable chain/faucet name to the site

* fix(faucet): chain variable missing from struct (#749)

This PR adds the missing Chain variable that missed in #747

* #561 Keychain fees should not be paid in advance (#662)

* Added keychain max wanted fees handling

* Implemented new testcase & snapshot

* Added annotations

* Added keychain fee max value specification

* Code review fixes

* Changed validation messages

* fix(x/act): add support for sdk.Coins in CLI flags

* Changed type to sdk.Coin

* Updated CHANGELOG.md

* Implemented escrow accounts for keychain fees

* Added CHANGELOG.md line

* Regenerated keychain snapshot

* Updated keychain deduction fee code

* Added test case for fee deduction with --max-keychain-fee

* Fixed actions auto parsing for cli

* Fixed bug with not forking fees deduction and context missing values

* Docker versions update

* Update cmd/wardend/cmd/gen-keychains.go

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Proto rebuild

* Merged changes from #560

* Code-review fixes

* Implemented integration test for escrow account

* Code review fixes

* Made KeychainFees = nil invalid

* Fixed error message

* Keychain fee validations

* Code review fixes

* Merge conflict fixes

* Lint fixes

---------

Co-authored-by: Antonio Pitasi <antonio@pitasi.dev>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* feat(spaceward): update for rebrand (#748)

* feat(spaceward): New theme added

* fix(spaceward): Some theme fixes

* fix(spaceward): Fixed keychains

* fix(spaceward): Some theme fixes and metamask

* fix(spaceward): Some more

* fix(spaceward): Space Mono

* fix(spaceward): fix for space mono font issue (#750)

* fix(spaceward): updated welcome message (#751)

* fix(faucet): fix daily limit i64 (#755)

This fixes issue where user puts high uward amount to daily limit and go
cannot parse it due to int restrictions

* Add chain upgrade instructions for v0.4.2 (#757)

* Add chain upgrade instructions for v0.4.2

* Update v0.4.2.md

* update v0.4.2

Co-authored-by: Joonas Lehtimäki <joonas.lehtimaki@gmail.com>

* remove reference to side-car

---------

Co-authored-by: Joonas Lehtimäki <joonas.lehtimaki@gmail.com>

* fixed spelling (#758)

* fixed spelling

* deleted the tip, fixed spelling

* update slinky

* fix(x/act): simplify prepareHandlerContext to always use sdk.Context

* updated gov proto; fix governance types (#761)

* Fix returned field (#765)

* fix(spaceward): Fix logos (#767)

* fix(spaceward): Fix logos

* fix(spaceward): updated logo for WC connection and updated hover fill colour

---------

Co-authored-by: Jon Heywood <94459819+jjheywood@users.noreply.github.com>

* fix(faucet): tx page loading (#768)

* feat(faucet): add new metric dailySupply

* fix(faucet): page keeps loading even if tx was finished

---------

Co-authored-by: backsapc <backsapce@hotmail.com>
Co-authored-by: Archie <artur.abliazimov@gmail.com>
Co-authored-by: Joonas Lehtimäki <joonas.lehtimaki@gmail.com>
Co-authored-by: Jon Heywood <94459819+jjheywood@users.noreply.github.com>
Co-authored-by: Antonio Pitasi <antonio@pitasi.dev>
Co-authored-by: Aliasgar Merchant <44069404+alijnmerchant21@users.noreply.github.com>
Co-authored-by: Margarita Skomorokh <ijonele@gmail.com>
Co-authored-by: Margarita Skomorokh <margaret.skomorokh@anychart.com>
Co-authored-by: Alex D <alex.d.nax@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Alice <37526212+laniakea42@users.noreply.github.com>
Co-authored-by: Tyler <48813565+technicallyty@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants