-
Notifications
You must be signed in to change notification settings - Fork 365
chore(distribution): Test calling query view methods in distribution precompile #1341
Conversation
WalkthroughThe changes involve updates to a Solidity smart contract and corresponding Go files in a Cosmos SDK module. New functions and events have been added to the contract to enhance interactions with the distribution module, and comments in the Go files have been clarified regarding the use of Changes
TipsChat with CodeRabbit Bot (
|
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.
Review Status
Actionable comments generated: 2
Configuration used: CodeRabbit UI
Files ignored due to filter (3)
- e2e/localnet/go.mod
- e2e/localnet/go.sum
- e2e/precompile/go.mod
Files selected for processing (2)
- contracts/src/cosmos/precompile/testing/DistributionQuerier.sol (1 hunks)
- cosmos/precompile/distribution/distribution.go (2 hunks)
Files skipped from review due to trivial changes (1)
- cosmos/precompile/distribution/distribution.go
Is this just adding a test? |
yeah @itsdevbear. confirmed it works as intended |
…precompile (#1341) - Related to issue of calling view functions which have underlying cosmos behavior that makes state changes - Add query method for delegator-validator rewards ## Summary by CodeRabbit - **New Features** - Introduced new functions for retrieving delegator rewards within the smart contract. - **Documentation** - Updated comments to clarify the use of `CacheContext` in view methods due to writes performed by the Cosmos SDK distribution module's querier. (cherry picked from commit 3294140)
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (3)
- contracts/src/cosmos/precompile/Distribution.sol (3 hunks)
- cosmos/precompile/distribution/distribution.go (4 hunks)
- cosmos/precompile/distribution/distribution_test.go (1 hunks)
Files skipped from review due to trivial changes (2)
- cosmos/precompile/distribution/distribution.go
- cosmos/precompile/distribution/distribution_test.go
Additional comments: 3
contracts/src/cosmos/precompile/Distribution.sol (3)
82-93: The summary indicates that the
setWithdrawAddress
andwithdrawDelegatorReward
methods have been modified to include new parameters and return types, but the hunks do not reflect these changes. Please verify if these modifications were part of the intended changes and ensure they are correctly implemented if so.30-43: The addition of the
WithdrawRewards
andSetWithdrawAddress
events aligns with the PR objectives and summary. These events are correctly implemented in the hunks.58-66: The new method
getDelegatorValidatorReward
has been added as described in the summary and aligns with the PR objectives.
…precompile (backport #1341) (#1342) This is an automatic backport of pull request #1341 done by [Mergify](https://mergify.com). --- <details> <summary>Mergify commands and options</summary> <br /> More conditions and actions can be found in the [documentation](https://docs.mergify.com/). You can also trigger Mergify actions by commenting on this pull request: - `@Mergifyio refresh` will re-evaluate the rules - `@Mergifyio rebase` will rebase this PR on its base branch - `@Mergifyio update` will merge the base branch into this PR - `@Mergifyio backport <destination>` will backport this PR on `<destination>` branch Additionally, on Mergify [dashboard](https://dashboard.mergify.com) you can: - look at your merge queues - generate the Mergify configuration with the config editor. Finally, you can contact us on https://mergify.com </details> Co-authored-by: Cal Bera <[email protected]>
Summary by CodeRabbit
New Features
Improvements
Documentation
CacheContext
in comments to better explain its role in view methods within the distribution module.