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

write CompactContractBytecode instead of CompactContract #833

Merged
merged 2 commits into from
Jan 28, 2022

Conversation

brockelmore
Copy link
Collaborator

Motivation

The existing CompactContract doesn't have enough information for our needs in foundry. So we write out CompactContractBytecode instead which is a slightly stripped down version of ContractBytecode. The reason to strip it down is because we lose a decent amount of performance if we write all the other things in ContractBytecode. This is a compromise between speed and the needed information.

Solution

Write CompactContractBytecode instead of CompactContract

PR Checklist

  • Added Tests
  • Added Documentation
  • Updated the changelog

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

necessary workaround until we find a more flexible solution.

still fails to compile due to changed types.

the Contracts.. representation is a bit of a mess...

@brockelmore
Copy link
Collaborator Author

brockelmore commented Jan 26, 2022

still fails to compile due to changed types.

wdym? compiles fine for me?

also ye we need to most likely abstract thing into traits imo

@mattsse
Copy link
Collaborator

mattsse commented Jan 26, 2022

@brockelmore
Copy link
Collaborator Author

brockelmore commented Jan 27, 2022

oh ye the tests fail, but it compiles okay

@gakonst
Copy link
Owner

gakonst commented Jan 27, 2022

LGTM modulo doc test fixing

Copy link
Owner

@gakonst gakonst left a comment

Choose a reason for hiding this comment

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

LGTM - we should do a pass at the whole crate to see if we got duplicate functionality / if we can clean things up

@gakonst gakonst merged commit 24c39bd into gakonst:master Jan 28, 2022
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