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: IPRPC over IBC: Part 5 - CNS-967: Cover pending IBC IPRPC fund costs #1470

Merged

Conversation

oren-lava
Copy link
Collaborator

In this PR, I implemented the cover-ibc-iprpc-fund-cost TX. This TX allows a lava user to send ulava to cover the minimum IPRPC funding cost for a specific PendingIbcIprpcFund (by index).

This TX automatically takes the required cost, funds the IPRPC pools, deletes the PendingIbcIprpcFund object and sends leftovers to the community pool. If the TX is issued by the gov module (using a proposal), the PendingIbcIprpcFund is applied without paying the minimum IPRPC cost.

@oren-lava oren-lava requested review from omerlavanet and Yaroms June 3, 2024 14:51
@oren-lava oren-lava self-assigned this Jun 3, 2024
@oren-lava oren-lava changed the title feat: IBC over IPRPC: Part 5 - CNS-967: Cover pending IBC IPRPC fund costs feat: IPRPC over IBC: Part 5 - CNS-967: Cover pending IBC IPRPC fund costs Jun 5, 2024
x/rewards/keeper/iprpc.go Outdated Show resolved Hide resolved
Copy link
Contributor

coderabbitai bot commented Jun 9, 2024

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

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.


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 as 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.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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.

oren-lava and others added 6 commits June 9, 2024 18:40
* CNS-968: add mock transfer keeper and IBC middleware to tester

* CNS-968: change middleware success ack and move create iprpc memo to types

* CNS-968: create ibc transfer helper func for tests and update tests

* CNS-968: lint fix

* feat: IPRPC over IBC: Part 7 - CNS-969 update README (#1482)

* CNS-969: improve comments

* CNS-969: rename param and move event

* CNS-969: update README

* CNS-969: small comment fix
@oren-lava oren-lava merged commit 600ae29 into CNS-966-pending-ibc-iprpc-fund-query Jul 8, 2024
4 checks passed
@oren-lava oren-lava deleted the CNS-967-cover-min-iprpc-cost-tx branch July 8, 2024 08:05
oren-lava added a commit that referenced this pull request Jul 8, 2024
…1457)

* CNS-966: implemented pending ibc iprpc query + unit test

* CNS-966: fix help section

* feat: IPRPC over IBC: Part 5 - CNS-967: Cover pending IBC IPRPC fund costs (#1470)

* CNS-967: implement cover ibc iprpc funds TX

* CNS-967: make gov module not pay min cost

* CNS-967: unit test

* CNS-967: partial merge from CNS-966

* CNS-967: small fixes

* feat: IPRPC over IBC: Part 6 - CNS-968: IBC middleware testing (#1481)

* CNS-968: add mock transfer keeper and IBC middleware to tester

* CNS-968: change middleware success ack and move create iprpc memo to types

* CNS-968: create ibc transfer helper func for tests and update tests

* CNS-968: lint fix

* feat: IPRPC over IBC: Part 7 - CNS-969 update README (#1482)

* CNS-969: improve comments

* CNS-969: rename param and move event

* CNS-969: update README

* CNS-969: small comment fix
oren-lava added a commit that referenced this pull request Jul 8, 2024
* CNS-965: scaffold param IbcIprpcExpiration

* CNS-965: create pending iprpc fund

* CNS-965: fix unit tests

* CNS-965: move pending iprpc to seperate files and add IsExpired

* CNS-965: renamed to PendingIbcIprpcFund + bug fixes

* CNS-965: unit tests

* CNS-965: remove expired PendingIbcIprpcFunds in begin block

* CNS-965: unit tests

* CNS-965: comment

* CNS-965: divide fund when creating a new pending ibc iprpc fund

* CNS-965: lint fix

* CNS-965: fixes

* CNS-965: add events

* CNS-965: fixes after merge

* CNS-965: revert ibc transfer in case of middleware failure

* CNS-965: pending iprpc pool + reorder code that ibc-transfer is last in middleware

* CNS-965: migrator for IbcIprpcExpiration param

* CNS-965: make expired pending iprpc funds be taken from the pending pool

* CNS-965: small fixes

* feat: IPRPC over IBC: Part 4 - CNS-966: pending ibc iprpc fund query (#1457)

* CNS-966: implemented pending ibc iprpc query + unit test

* CNS-966: fix help section

* feat: IPRPC over IBC: Part 5 - CNS-967: Cover pending IBC IPRPC fund costs (#1470)

* CNS-967: implement cover ibc iprpc funds TX

* CNS-967: make gov module not pay min cost

* CNS-967: unit test

* CNS-967: partial merge from CNS-966

* CNS-967: small fixes

* feat: IPRPC over IBC: Part 6 - CNS-968: IBC middleware testing (#1481)

* CNS-968: add mock transfer keeper and IBC middleware to tester

* CNS-968: change middleware success ack and move create iprpc memo to types

* CNS-968: create ibc transfer helper func for tests and update tests

* CNS-968: lint fix

* feat: IPRPC over IBC: Part 7 - CNS-969 update README (#1482)

* CNS-969: improve comments

* CNS-969: rename param and move event

* CNS-969: update README

* CNS-969: small comment fix
oren-lava added a commit that referenced this pull request Jul 8, 2024
…ver IBC proposal (#1450)

* CNS-964: generate ibc transfer tx cli

* CNS-964: PR fixes

* CNS-964: lint fix

* CNS-964: replace generate-ibc-transfer with submit-ibc-transfer

* feat: IPRPC over IBC: Part 3 - CNS-965: Pending IPRPC IBC fund (#1452)

* CNS-965: scaffold param IbcIprpcExpiration

* CNS-965: create pending iprpc fund

* CNS-965: fix unit tests

* CNS-965: move pending iprpc to seperate files and add IsExpired

* CNS-965: renamed to PendingIbcIprpcFund + bug fixes

* CNS-965: unit tests

* CNS-965: remove expired PendingIbcIprpcFunds in begin block

* CNS-965: unit tests

* CNS-965: comment

* CNS-965: divide fund when creating a new pending ibc iprpc fund

* CNS-965: lint fix

* CNS-965: fixes

* CNS-965: add events

* CNS-965: fixes after merge

* CNS-965: revert ibc transfer in case of middleware failure

* CNS-965: pending iprpc pool + reorder code that ibc-transfer is last in middleware

* CNS-965: migrator for IbcIprpcExpiration param

* CNS-965: make expired pending iprpc funds be taken from the pending pool

* CNS-965: small fixes

* feat: IPRPC over IBC: Part 4 - CNS-966: pending ibc iprpc fund query (#1457)

* CNS-966: implemented pending ibc iprpc query + unit test

* CNS-966: fix help section

* feat: IPRPC over IBC: Part 5 - CNS-967: Cover pending IBC IPRPC fund costs (#1470)

* CNS-967: implement cover ibc iprpc funds TX

* CNS-967: make gov module not pay min cost

* CNS-967: unit test

* CNS-967: partial merge from CNS-966

* CNS-967: small fixes

* feat: IPRPC over IBC: Part 6 - CNS-968: IBC middleware testing (#1481)

* CNS-968: add mock transfer keeper and IBC middleware to tester

* CNS-968: change middleware success ack and move create iprpc memo to types

* CNS-968: create ibc transfer helper func for tests and update tests

* CNS-968: lint fix

* feat: IPRPC over IBC: Part 7 - CNS-969 update README (#1482)

* CNS-969: improve comments

* CNS-969: rename param and move event

* CNS-969: update README

* CNS-969: small comment fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment