You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are currently facing challenges with cyclical dependencies among our smart contracts. The ideal approach to address this issue would be to pass the dependent contract addresses directly to the constructors during deployment, allowing us to store these addresses as immutable state variables. However, due to the existing cyclical dependencies, this straightforward approach is not feasible with our current deployment method.
Proposed Solution
To resolve the cyclical dependencies during the deployment of our smart contracts, it is proposed to utilize CREATE3. CREATE3 allows for deploying contracts to deterministic addresses using only a salt. This method would enable us to:
Deploy all contracts with cyclical dependencies to known, deterministic addresses.
Directly pass these addresses to constructors, thereby storing them as immutable variables within the contract.
Remove the need for governance functions previously used to set these addresses, thereby simplifying our protocol.
Benefits
Immutable Storage: By deploying using CREATE3, the addresses of dependent contracts can be hardcoded as immutable
Simplification of Protocol: Eliminates the need for governance actions to set contract addresses post-deployment, which simplifies interaction and reduces potential errors.
The text was updated successfully, but these errors were encountered:
Issue Description
We are currently facing challenges with cyclical dependencies among our smart contracts. The ideal approach to address this issue would be to pass the dependent contract addresses directly to the constructors during deployment, allowing us to store these addresses as immutable state variables. However, due to the existing cyclical dependencies, this straightforward approach is not feasible with our current deployment method.
Proposed Solution
To resolve the cyclical dependencies during the deployment of our smart contracts, it is proposed to utilize CREATE3. CREATE3 allows for deploying contracts to deterministic addresses using only a salt. This method would enable us to:
Benefits
The text was updated successfully, but these errors were encountered: