Skip to content
This repository was archived by the owner on May 6, 2025. It is now read-only.

Update the SDK for downstream optimizations #32

Merged
merged 8 commits into from
Nov 14, 2022

Conversation

ali-behjati
Copy link
Contributor

@ali-behjati ali-behjati commented Nov 14, 2022

This PR changes the SDK for optimization purposes that:

  1. Removes unnecessary events and event fields. This will help to save ~8.5k gas upon a price update. This change is breaking for off-chain event listeners but non-breaking for on-chain consumers. So it has only a minor version change.
  2. Makes all AbstractPyth methods virtual to allow the downstream contracts to override the methods for optimization.

It also moves the events to IPythEvents interface so they can be used in solidity tests.

This is helpful for testing in solidity (using Foundry)
This will allow downstream further optimizations
Events changes are breaking only to downstream consumers and not for
on-chain consumers. So it's minor for on-chain usage.
@ali-behjati ali-behjati requested review from jayantk, tompntn and njk-64 and removed request for jayantk November 14, 2022 09:54
@ali-behjati ali-behjati merged commit 32c079a into main Nov 14, 2022
@ali-behjati ali-behjati deleted the abehjati/update-interface-for-optimization branch November 14, 2022 10:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants