mud
mud copied to clipboard
declare and deploy module systems with deploy CLI instead of inside module install
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
@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?
Maybe we have some preprocessor that replace system creation with their deterministic address. Sadly i'm not sure Solidity alone will play nice here.
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.