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

declare and deploy module systems with deploy CLI instead of inside module install #2737

Open
holic opened this issue Apr 25, 2024 · 3 comments

Comments

@holic
Copy link
Member

holic commented Apr 25, 2024

creating system contracts eats up a lot of the gas used in a module install so we should figure out how to separate the system deploy, esp since we can route it through the deterministic deployer

@holic
Copy link
Member Author

holic commented Apr 25, 2024

@alvrs noted this would prob be easier if we could point to a module dir/package that as a mud config and load from that, but we'll probably need some way to determine that it's a module and not a world?

@ludns
Copy link
Member

ludns commented Apr 25, 2024

Maybe we have some preprocessor that replace system creation with their deterministic address. Sadly i'm not sure Solidity alone will play nice here.

@holic
Copy link
Member Author

holic commented Apr 25, 2024

Maybe we have some preprocessor that replace system creation with their deterministic address. Sadly i'm not sure Solidity alone will play nice here.

We use a common deployer interface, so I think we could pass in the deployer address and call it to create the contract?

(bool success, bytes memory data) = deployer.call(abi.encodePacked(SALT, type(SomeSystem).creationCode));

but prob need to wrap this in a lib that can do a bytecode check to make sure its not already deployed, returns a nice address, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants