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

chore(metrics): Refactor and add a metrics for the tracking the balance of the sender of the PSPs. #76

Merged
merged 6 commits into from
Sep 26, 2024

Conversation

Ethnical
Copy link
Collaborator

@Ethnical Ethnical commented Sep 25, 2024

Description
This PR include a refactor + the add of the feature GetBalance().
and a new metric prometheus balanceSenderAddress:
b4ca91fd623bb14d09c7da83b737ec99a22d9d51eb4e2b1a5cfbeccfb6b792e0
Also updated the docs accordingly.

Tests
I have tested locally with differentes balances.

Additional context

Metadata

This is part of https://github.com/ethereum-optimism/security-pod/issues/147

@Ethnical Ethnical marked this pull request as ready for review September 25, 2024 11:04
@Ethnical Ethnical requested a review from a team as a code owner September 25, 2024 11:04
num := new(big.Rat).SetInt(wei)
denom := big.NewRat(1e18, 1)
num = num.Quo(num, denom)
f, _ := num.Float64()
Copy link
Contributor

Choose a reason for hiding this comment

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

Shall this error be managed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@raffaele-oplabs I have addressed the changes!
Thanks!

Copy link
Contributor

@raffaele-oplabs raffaele-oplabs left a comment

Choose a reason for hiding this comment

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

LGTM

@Ethnical Ethnical merged commit d147689 into main Sep 26, 2024
9 checks passed
@Ethnical Ethnical deleted the ethni/add-balance-metrics branch September 26, 2024 08:55
@Ethnical Ethnical added the enhancement New feature or request label Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants