-
Notifications
You must be signed in to change notification settings - Fork 16
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
Support factory pattern for deployment #607
Comments
@maguroid thanks for the kind words ... and the repo to help us reproduce the issues. On the visualization error. I was able to get a minimally reproducible example where the module id of a submodule matches the module id of the root module. In this case both the vault module and the vault factory module have the same id. If I rename the vault factory module I get a visualization. This is missing validation, you should have got a clear and comprehensible error on running Can I confirm @maguroid that So something like: const univ3Usdc = m.contractAt('Vault', m.readEventArgument(create1, 'VaultCreated', 'vault', { id: 'read1' }), { id: 'create1' })
const mockUsdc = m.contractAt('Vault', m.readEventArgument(create2, 'VaultCreated', 'vault', { id: 'read2' }), { id: 'create2' })
return {
vaultFactory,
univ3Usdc,
mockUsdc,
} Shows the contracts deployed through the factory in the deploy command: But the returned |
@kanej
Yes. It would be greatly appreciated if this issue could be resolved... |
I think it makes sense to include |
This is a bug, we suspect that our check for recording the deployed address should include the contractAt init message: |
While trying out, I realized that the deployed contract addresses are not stored when using a factory contract for deployment. Additionally, the visualization failed with the following error:
Here is my module for reproduction:
https://github.com/maguroid/hardhat-ignition-demo/blob/factory-pattern/ignition/modules/Vault.ts
I want to express my gratitude to the entire team for their hard work and support throughout this project. Your dedication has been invaluable.
The text was updated successfully, but these errors were encountered: