Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: pack PortfolioPosition struct #254

Merged
merged 4 commits into from
Mar 8, 2023

Conversation

TomAFrench
Copy link
Contributor

I've packed the lastTimestamp field in PortfolioPosition so save some SSTOREs.

I've chosen a uint32 to match what's used in PortfolioPool however you have some extra space in these structs so you could push them out to a uint64 quite happily to avoid Y2038.

@TomAFrench TomAFrench changed the title chore: pack PortfolioPosition struct feat: pack PortfolioPosition struct Mar 6, 2023
Copy link
Contributor

@Alexangelj Alexangelj left a comment

Choose a reason for hiding this comment

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

LGTM

@clemlak clemlak merged commit 4b53d56 into primitivefinance:main Mar 8, 2023
@TomAFrench TomAFrench deleted the struct-packing branch March 8, 2023 19:11
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