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

Add memory/validator/<valindices> endpoint changes #211

Closed
wants to merge 1 commit into from

Conversation

Marketen
Copy link
Contributor

Now, the API endpoint memory/validator/<index> accepts more than one index: memory/validator/<index1, index2...> .

Found validators are returned in found_validators array. Not found validators are returned in not_found_validators array.

This PR also converts the big numbers returned in the endpoint to a string. This was not done before and it is done in other endpoints like memory/validators

An example response looks like this:

{
  "found_validators": [
    {
      "status": "active",
      "accumulated_rewards_wei": "0",
      "pending_rewards_wei": "80667772449989460",
      "collateral_wei": "80000000000000000",
      "withdrawal_address": "0x9b3b13d6b6f3f52154a8b00d818392b61e4b42b4",
      "validator_index": 656445,
      "validator_key": "0x8ec1534649a99c26da8a939c8b1ebe04f8da3ef05c2fa1a6cd221efd308478ec6d235e0cdbf61357de4c4d995dc57219",
      "subscription_type": "manual"
    }
  ],
  "not_found_validators": [
    "128"
  ]
}

@Marketen Marketen self-assigned this Jan 11, 2024
@Marketen Marketen changed the title Add endpoint changes Add `memory/validator/<valindices> endpoint changes Jan 11, 2024
@Marketen Marketen changed the title Add `memory/validator/<valindices> endpoint changes Add memory/validator/<valindices> endpoint changes Jan 11, 2024
@alrevuelta alrevuelta closed this Jan 12, 2024
@alrevuelta alrevuelta deleted the marc/improve_memory_validator_endpoint branch January 12, 2024 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants