Skip to content

feat: implement GetParams for precompiles #277

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

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

zsystm
Copy link
Contributor

@zsystm zsystm commented Jul 10, 2025

Description

Closes: #270

Summary of changes

  • Implemented GetParams methods for the following precompiles:
    • Staking
    • Distribution
  • Skipped GetParams implementation for the Bank precompile, as we are using the precisebank keeper, which does not expose any parameters to retrieve.
  • Skipped GetParams implementation for the ERC20 precompile as well, since it is a shared implementation used by multiple dynamic precompiles. Adding a global GetParams method would apply to all of them uniformly, which may not be appropriate or meaningful in every context.

Notes


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • tackled an existing issue or discussed with a team member
  • left instructions on how to review the changes
  • targeted the main branch

Reviewers Checklist

All items are required.
Please add a note if the item is not applicable
and please add your handle next to the items reviewed
if you only reviewed selected items.

I have...

  • added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • confirmed all author checklist items have been addressed
  • confirmed that this PR does not change production code
  • reviewed content
  • tested instructions (if applicable)
  • confirmed all CI checks have passed

@zsystm zsystm self-assigned this Jul 10, 2025
@zsystm zsystm force-pushed the precompiles/get-params branch from 1703416 to b604d1e Compare July 29, 2025 06:39
The ERC20 precompile is different from other modules like staking or distribution — it’s reused across multiple dynamic precompiles.

Adding a getParams method to ERC20 would affect all of them uniformly, which feels unnatural and potentially confusing.
@zsystm zsystm force-pushed the precompiles/get-params branch from b604d1e to f7543c0 Compare July 29, 2025 06:44
@zsystm zsystm marked this pull request as ready for review August 12, 2025 09:22
@zsystm zsystm requested review from a team as code owners August 12, 2025 09:22
@zsystm zsystm requested a review from vladjdk August 12, 2025 22:53
@aljo242 aljo242 added the v0.5.x targeting v0.5.x label Aug 14, 2025
Copy link
Contributor

@cloudgray cloudgray left a comment

Choose a reason for hiding this comment

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

LGTM with nit!

Copy link
Contributor

@cloudgray cloudgray left a comment

Choose a reason for hiding this comment

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

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v0.5.x targeting v0.5.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GetParams implementation for other precompiles
3 participants