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

kaiax/gov: add crits and fix kaia_getParams #243

Merged
merged 4 commits into from
Feb 3, 2025
Merged

Conversation

ian0371
Copy link
Collaborator

@ian0371 ian0371 commented Jan 31, 2025

Proposed changes

Add Crit on unexpected error; it may be better to panic than to continue with invalid value.

For backward compatibility, fix the return type of kaia_getParams from int to string for reward.mintingamount and reward.minimumstake.

See #189 (comment)

Types of changes

  • Bugfix
  • New feature or enhancement
  • Others

Checklist

  • I have read the CONTRIBUTING GUIDELINES doc
  • I have read the CLA and signed by comment I have read the CLA Document and I hereby sign the CLA in first time contribute
  • Lint and unit tests pass locally with my changes ($ make test)
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in downstream modules

@ian0371 ian0371 self-assigned this Jan 31, 2025
@ian0371 ian0371 requested a review from hyeonLewis January 31, 2025 09:47
@ian0371 ian0371 changed the title Fix kaia_getParams kaiax/gov: add crits and fix kaia_getParams Jan 31, 2025
ChainConfig can have missing fields, especially in tests.
@hyeonLewis hyeonLewis mentioned this pull request Feb 3, 2025
20 tasks
@hyeonLewis
Copy link
Contributor

Testing results and all issues resolved.

> kaia.getParams("latest")
{ 
  ...
  reward.minimumstake: "5000000",
  reward.mintingamount: "9600000000000000000",
  ...
}

> governance.getParams(112492799)
{
  governance.deriveshaimpl: 2,
  ...
}

> kaia.getChainConfig(112492799)
{
  ...
  deriveShaImpl: 2,
  ...
}

@ian0371 ian0371 merged commit 3ca2161 into kaiachain:dev Feb 3, 2025
11 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Feb 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants