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

Abehjati/fix-mem-layout #25

Merged
merged 4 commits into from
Aug 23, 2022
Merged

Abehjati/fix-mem-layout #25

merged 4 commits into from
Aug 23, 2022

Conversation

ali-behjati
Copy link
Contributor

@ali-behjati ali-behjati commented Aug 23, 2022

Also some refactorings based on solsecurity

The main reason for this change is that updatePriceFeeds in the actual contract (in pyth-crosschain) and a function that it calls use calldata and updatePriceFeedsIfNecessary is passing a memory argument. It causes a revert because memory cannot be converted to calldata (in a local function call).

We could've have change the contract to use memory but using calldata here is more gas efficients and avoids a copy.

@ali-behjati ali-behjati requested review from jayantk and tompntn August 23, 2022 14:27
jayantk
jayantk previously approved these changes Aug 23, 2022
tompntn
tompntn previously approved these changes Aug 23, 2022
@tompntn
Copy link
Contributor

tompntn commented Aug 23, 2022

Nice! I wonder if we should add solsecurity to the CI/CD for the Solidity contracts?

@ali-behjati
Copy link
Contributor Author

ali-behjati commented Aug 23, 2022

I'm not sure whether they have CI/CD, do they? I thought it's more of a guideline for the auditors.

@ali-behjati ali-behjati dismissed stale reviews from tompntn and jayantk via 00051e1 August 23, 2022 15:07
Co-authored-by: Tom Pointon <tom@teepeestudios.net>
@ali-behjati ali-behjati requested review from tompntn and jayantk August 23, 2022 15:28
@ali-behjati ali-behjati merged commit a657d3e into main Aug 23, 2022
@ali-behjati ali-behjati deleted the abehjati/fix-mem-layout branch August 23, 2022 15:39
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