Skip to content

Conversation

@Riateche
Copy link
Contributor

Summary

Add exponent field.

Rationale

It simplifies the code in a lot of places where we previously had to pass the exponent in a separate argument.

How has this been tested?

  • Current tests cover my changes
  • Added new tests
  • Manually tested the code

@vercel
Copy link

vercel bot commented Nov 13, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
api-reference Ready Ready Preview Comment Nov 13, 2025 2:22pm
component-library Ready Ready Preview Comment Nov 13, 2025 2:22pm
developer-hub Ready Ready Preview Comment Nov 13, 2025 2:22pm
entropy-explorer Ready Ready Preview Comment Nov 13, 2025 2:22pm
insights Ready Ready Preview Comment Nov 13, 2025 2:22pm
proposals Error Error Nov 13, 2025 2:22pm
staking Error Error Nov 13, 2025 2:22pm

// [required] Exponent applied to all price and rate values for this feed.
// Actual value is `mantissa * 10 ^ exponent`.
// Restricted to int16.
optional int32 exponent = 9;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it backward compatible?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we need to release this in 2 stages for backward compatibility.
first write this data to state, and then read it from state.
right @Riateche ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adding a field is backwards compatible.

No, 2 stages are not needed. I made it so that if there is no value in the snapshot, it will fill exponent from static data.

@Riateche Riateche merged commit f3f6da5 into main Nov 13, 2025
8 of 10 checks passed
@Riateche Riateche deleted the lazer-update-add-exponent branch November 13, 2025 17:09
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.

4 participants