Skip to content

New balances structure. #1170

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

Merged
merged 2 commits into from
Feb 10, 2025
Merged

New balances structure. #1170

merged 2 commits into from
Feb 10, 2025

Conversation

Andrei-Dolgolev
Copy link
Contributor

@Andrei-Dolgolev Andrei-Dolgolev commented Feb 5, 2025

This pull request includes several changes to the nodebalancer. The most important changes include updating the JSON structure in the README, modifying the balances.go and configs.go files to include additional chain information, and updating the contracts.json structure.

Documentation Updates:

  • nodebalancer/README.md: Updated the JSON structure to include additional chain information such as chain_id, name, and image_url. The top-level keys are now chain IDs, and the balances are nested within each chain object. [1] [2]

Codebase Enhancements:

These changes improve the readability and usability of the JSON responses and configuration files by including more detailed information about each blockchain.

response example.

{
  "1": {
    "chain_id": "1",
    "name": "ethereum",
    "image_url": "https://example.com/eth.png",
    "balances": {
      "0x0000000000000000000000000000000000000000": "1000000000000000000",
      "0xdac17f958d2ee523a2206206994597c13d831ec7": "2000000000000000000",
      "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48": "3000000000000000"
    }
  },
  "137": {
    "chain_id": "137", 
    "name": "polygon",
    "image_url": "https://example.com/matic.png",
    "balances": {
      "0x0000000000000000000000000000000000000000": "4000000000000000000",
      "0x2791bca1f2de4661ed88a30c99a7a9449aa84174": "5000000000000000",
      "0xc2132d05d31c914a87c6611c10748aeb04b58e8f": "6000000000000000000"
    }
  }
}

Copy link
Contributor

@kompotkot kompotkot left a comment

Choose a reason for hiding this comment

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

lg

@Andrei-Dolgolev Andrei-Dolgolev merged commit 8e1d267 into main Feb 10, 2025
1 check failed
@Andrei-Dolgolev Andrei-Dolgolev deleted the update-balances-structure branch February 10, 2025 18:37
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