Skip to content

Conversation

@aditya520
Copy link
Member

Summary

Makes all helper functions in PythLazerLib public and standardizes parsing functions to use bytes memory instead of bytes calldata. This allows direct library calls without a wrapper contract and aligns with how payloads are received from external contract calls.

Rationale

Previously, helper functions (has*, isRequested, get) were internal, requiring a wrapper contract (PythLazerLibTestHelper) for external access. Additionally, parsing functions used bytes calldata, but when verifyUpdate returns payload data, it crosses an external call boundary and must be received as bytes memory due to ABI encoding rules. Making functions public and standardizing on memory simplifies the API and matches real-world usage patterns.

Context: https://github.com/pyth-network/pyth-examples/pull/92/files#r2631811673

How has this been tested?

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

@vercel
Copy link

vercel bot commented Jan 2, 2026

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

Project Deployment Review Updated (UTC)
api-reference Ready Ready Preview, Comment Jan 2, 2026 6:33pm
component-library Ready Ready Preview, Comment Jan 2, 2026 6:33pm
developer-hub Ready Ready Preview, Comment Jan 2, 2026 6:33pm
entropy-explorer Ready Ready Preview, Comment Jan 2, 2026 6:33pm
insights Ready Ready Preview, Comment Jan 2, 2026 6:33pm
proposals Ready Ready Preview, Comment Jan 2, 2026 6:33pm
staking Ready Ready Preview, Comment Jan 2, 2026 6:33pm

@aditya520 aditya520 merged commit e7b0f44 into main Jan 5, 2026
13 checks passed
@aditya520 aditya520 deleted the feat(lazer)-fix-memory-methods branch January 5, 2026 14:27
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