8000 Implement klay_getRewards API (KIP82) by ian0371 · Pull Request #1666 · klaytn/klaytn · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Aug 19, 2024. It is now read-only.

Implement klay_getRewards API (KIP82) #1666

Merged
merged 3 commits into from
Nov 21, 2022
Merged

Conversation

ian0371
Copy link
Contributor
@ian0371 ian0371 commented Nov 4, 2022

Proposed changes

This PR implements klay_getRewards(num) API. Closes #1657

// Request
curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0", "method":"klay_getRewards", "params":["0x64fe7e0"],"id":1}' https://api.baobab.klaytn.net:8651
// Response
{
  "jsonrpc":"2.0",
  "id":1,
  "result":{
    "minted": "6400000000000000000",
    "totalFee": "1075975000000000",
    "burntFee": "537987500000000",
    "proposer": "3200268993750000000",
    "stakers": "0",
    "kgf": "2560215195000000000",
    "kir": "640053798750000000"
    "rewards": {
      "0xa86fd667c6a340c53cc5d796ba84dbe1f29cb2f7": "3200268993750000000",
      "0x2bcf9d3e4a846015e7e3152a614c684de16f37c6": "2560215195000000000",
      "0x716f89d9bc333286c79db4ebb05516897c8d208a": "640053798750000000"
    }
  }
}
  • Describe your changes to communicate to the maintainers why we should accept this pull request.
  • If it fixes a bug or resolves a feature request, be sure to link to that issue.

Types of changes

Please put an x in the boxes related to your change.

  • Bugfix
  • New feature or enhancement
  • Others

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING GUIDELINES doc
  • I have signed the CLA
  • 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

Related issues

  • Please leave the issue numbers or links related to this PR here.

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

@ian0371 ian0371 force-pushed the feat/kip82-api branch 2 times, most recently from 8e1e6cb to 6b40406 Compare November 7, 2022 05:28
@ian0371 ian0371 added this to the v1.10.0 (Kore) milestone Nov 7, 2022
@ian0371 ian0371 merged commit b0659bd into klaytn:dev Nov 21, 2022
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.

Implement Rewards API
4 participants
0