Skip to content

Conversation

kulikthebird
Copy link
Contributor

@kulikthebird kulikthebird commented Sep 25, 2025

why?

  • ...
  • Task: ?

how?

  • ...

testing

  • ...

Greptile Overview

Updated On: 2025-09-25 17:08:23 UTC

Summary

This PR fixes fee parameter passing in CosmWasm proposal submission functions. Previously, fee parameters were ignored (using _fee) and not passed to the underlying submitProposal function, which could cause issues with transaction fee calculation.

  • Modified function signatures to accept and use fee parameter instead of ignoring it
  • Updated callSubmitProposal to accept and pass through the fee parameter
  • Applied changes consistently across all proposal submission functions (storeCode, instantiate, execute, paramChange, migrate)

Confidence Score: 2/5

  • This PR contains a critical typo that will cause runtime errors in parameter change proposals
  • While the core logic fix is correct and needed, there's a syntax error (typo 'proposa' instead of 'proposal') that will cause the paramChange function to fail at runtime
  • cosmwasm/submit-proposal.js requires immediate attention due to the typo on line 238

Important Files Changed

File Analysis

Filename        Score        Overview
cosmwasm/submit-proposal.js 2/5 Fixed fee parameter passing but introduced a critical typo that will cause runtime errors

Sequence Diagram

sequenceDiagram
    participant User as User/CLI
    participant Main as mainProcessor
    participant Func as Function (storeCode, instantiate, etc)
    participant Call as callSubmitProposal
    participant Submit as submitProposal (utils)
    participant Chain as Blockchain

    User->>Main: Execute command with fee calculation
    Main->>Func: Call function with precalculated fee
    Func->>Func: Prepare proposal data
    Func->>Call: callSubmitProposal(client, config, options, proposal, fee)
    Call->>Submit: submitProposal(client, config, options, proposal, fee)
    Submit->>Chain: Submit proposal with correct fee
    Chain-->>Submit: Return proposal ID
    Submit-->>Call: Return proposal ID
    Call-->>Func: Return proposal ID
    Func-->>Main: Return proposal ID
    Main-->>User: Display success message
Loading

@kulikthebird kulikthebird marked this pull request as ready for review September 25, 2025 17:06
@kulikthebird kulikthebird requested a review from a team as a code owner September 25, 2025 17:06
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
cursor[bot]

This comment was marked as outdated.

@kulikthebird kulikthebird enabled auto-merge (squash) September 25, 2025 18:05
@kulikthebird kulikthebird merged commit bcacddf into main Sep 25, 2025
10 checks passed
@kulikthebird kulikthebird deleted the fix/proposals_fee_calculation branch September 25, 2025 18:05
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