forked from foundry-rs/foundry
    
        
        - 
                Notifications
    You must be signed in to change notification settings 
- Fork 6
Open
Milestone
Description
Existing zkUseFactoryDep available here as example for grooming this task:
/// Marks a given contract as a factory dependency only for the next CREATE or CALL operation
function zkUseFactoryDep(string calldata name) external pure;Proposed Cheat Code for PVM
- Function Name: pvmUseFactoryDep
- Signature:
function pvmUseFactoryDep(string calldata name) external pure;- Purpose: Marks a contract as a factory dependency for the next CREATEorCALLoperation in PVM, unmarking it afterward, enabling factories to deploy contracts that are not direct dependencies on a Polkadot parachain.
- Parameters:
- name: Name of the contract to mark as a factory dependency.
 
- Example Usage:
// Deploy a factory contract on a Polkadot parachain
Factory factory = new Factory(polkaBytecodeHash);
vmExt.pvmUseFactoryDep("Contract");
factory.deployContract(polkaBytecodeHash); // Deploys ContractEstimation: 10D
Metadata
Metadata
Assignees
Labels
No labels