Skip to content

useFactoryDep #169

@filip-parity

Description

@filip-parity

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 CREATE or CALL operation 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 Contract

Estimation: 10D

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions