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

Add compilation restrictions #921

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

gretzke
Copy link
Contributor

@gretzke gretzke commented Nov 22, 2024

No description provided.

@wjmelements
Copy link
Contributor

Does this help with #918?

@gretzke
Copy link
Contributor Author

gretzke commented Nov 25, 2024

no, this PR focuses on the reduction of compilation times

@gretzke gretzke marked this pull request as ready for review November 25, 2024 22:06
@gretzke gretzke requested a review from a team as a code owner November 25, 2024 22:06
@gretzke
Copy link
Contributor Author

gretzke commented Nov 25, 2024

@ reviewers please double check the bytecode!

@gretzke
Copy link
Contributor Author

gretzke commented Nov 25, 2024

If we merge this, we can't update v4-periphery to point to the new main branch because I'm pretty sure vm.getCode will fail because the compiler artifact is different in periphery.

@hensha256
Copy link
Contributor

If we merge this, we can't update v4-periphery to point to the new main branch because I'm pretty sure vm.getCode will fail because the compiler artifact is different in periphery.

This seems like a problem to me?

manager = new PoolManager(address(this));
function deployFreshManager() internal virtual returns (IPoolManager manager_) {
bytes memory bytecode =
abi.encodePacked(vm.getCode("out/PoolManager.sol/PoolManager.default.json"), abi.encode(address(this)));
Copy link
Contributor

Choose a reason for hiding this comment

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

why cant you do it as it was before?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree that it's somewhat of a problem. But we can probably also migrate periphery to use briefcase instead of v4 directly?
If we deploy the pool manager using the new keyword instead of assembly, then the tests run against a version of the pool that is compiled without IR, so the bytecode of the pool manager will be different.

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