Skip to content

Conversation

keyvankhademi
Copy link
Contributor

Summary

refactor pyth lazer protocol to be more readable and have consistent variable/function names for value, mantissa, and exponent that follows the following formula
value = mantissa * 10^exponent

Rationale

The code was hard to understand

How has this been tested?

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

ran tests

Copy link

vercel bot commented Aug 11, 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 Aug 28, 2025 9:26am
component-library Ready Ready Preview Comment Aug 28, 2025 9:26am
developer-hub Ready Ready Preview Comment Aug 28, 2025 9:26am
entropy-debugger Ready Ready Preview Comment Aug 28, 2025 9:26am
entropy-explorer Ready Ready Preview Comment Aug 28, 2025 9:26am
insights Ready Ready Preview Comment Aug 28, 2025 9:26am
proposals Ready Ready Preview Comment Aug 28, 2025 9:26am
staking Ready Ready Preview Comment Aug 28, 2025 9:26am

@@ -7,7 +7,7 @@ license = "Apache-2.0"
repository = "https://github.com/pyth-network/pyth-crosschain"

[dependencies]
pyth-lazer-protocol = { version = "0.11.0", path = "../../sdk/rust/protocol" }
pyth-lazer-protocol = { version = "0.12.0", path = "../../sdk/rust/protocol" }
Copy link
Contributor

Choose a reason for hiding this comment

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

NIT: 0.11.1?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is function name change.

@vercel vercel bot temporarily deployed to Preview – api-reference August 12, 2025 14:25 Inactive
@vercel vercel bot temporarily deployed to Preview – developer-hub August 12, 2025 14:25 Inactive
@vercel vercel bot temporarily deployed to Preview – component-library August 12, 2025 14:25 Inactive
@vercel vercel bot temporarily deployed to Preview – insights August 12, 2025 14:25 Inactive
@vercel vercel bot temporarily deployed to Preview – entropy-explorer August 12, 2025 14:25 Inactive
@vercel vercel bot temporarily deployed to Preview – staking August 12, 2025 14:25 Inactive
@vercel vercel bot temporarily deployed to Preview – proposals August 12, 2025 14:25 Inactive
Copy link
Contributor

@Riateche Riateche left a comment

Choose a reason for hiding this comment

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

Thanks! Yeah, of course it's "with_same_exponent", not "with_same_mantissa".

Sadly I already bumped versions and published them after my PR, so you'll need to bump versions again. Patch bump is probably enough, since new versions haven't been used anywhere yet.

@Riateche Riateche merged commit 61d7e0a into main Aug 28, 2025
10 checks passed
@Riateche Riateche deleted the refactor-protocol branch August 28, 2025 09:31
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.

3 participants