Create a child contract and pass init params

What is the correct way to create a contract from another contract and pass initialize parameters to it? I have one project file lib.rs with the parent contract and I want to call another project file in my src folder called child_contract.rs and create the contract ChildContract and pass initialization parameters.

Am I suppose to call the child struct with the macro (sdk::create_contract!(ChildContract);?

Before digging into the solution for contract creation within the contract, are you sure you want this? Cipher has - in contrast to EVM - three contract operations to avoid contract wrappers: upload, instantiate and upgrade. The first one uploads your WASM code, the second one instantiates it and the third replaces the code of already instantiated contract with a new code and you can also pass specific upgrade/migration parameters.

Yes, in Rust, you can create a contract from another contract and pass initialization parameters to it using the sdk::create_contract! macro!