Developers Forum for XinFin XDC Network

Discussion on: [Solved] How to get the rewards received by each masternode in each epoch using RPC calls.

Collapse
david profile image
David Author • Edited on

Thank you, I was able to get the data from this. Just need one help, can you please help me understand the data a bit, I figured out the data in the signers key, it contains the candidate address as the key and reward and sign by that address in the object. Can you help me to understand the rewards object, I am not able to figure out that, I see that the key is the candidate address, but then the object has 2/3 more addresses, which seem to be owner addresses but when I check the rewards tab for those, one show rewards being received, while the remaining show no rewards received. I have attached the screenshot of the result.

xdc.dev/uploads/articles/q27yvui6p...

Collapse
gzliudan profile image
Daniel Liu • Edited on

Please use the object '.result.signers' in json. For the below json:

  • signer: 0x014428e60faa874f8266d0648c52a83506dd9ec6
  • holders of signer:
    • 0x181fa59072559ec53ab23246f089ad8b78e97089
    • 0x333e300d6b5a3b4857f5421891caf6f7f7e39db9
    • 0x92a289fe95a85c53b8d0d113cbaef0c1ec98ac65
{
  "result": {
    "rewards": {
      "0x014428e60faa874f8266d0648c52a83506dd9ec6": {
        "0x181fa59072559ec53ab23246f089ad8b78e97089": 0,
        "0x333e300d6b5a3b4857f5421891caf6f7f7e39db9": 42870752619879326000,
        "0x92a289fe95a85c53b8d0d113cbaef0c1ec98ac65": 4763416957764369000
      }
}
Enter fullscreen mode Exit fullscreen mode
Thread Thread
david profile image
David Author

Yes, I am using that, thought .rewards also might be having some significance, so just wanted to understand that, thank you for the help.

Thread Thread
gzliudan profile image
Daniel Liu • Edited on

You can get some information from the function HookReward in the file engine_v1_hooks.go.

Thread Thread
david profile image
David Author

Okay, thank you, will check