Skip to content

Document factory deployment (with foundry) #3

@fmnxl

Description

@fmnxl

Document how the CREATE3Factory itself should be deployed on different chains so that it deploys contracts to the same addresses.

e.g. for foundry scripts

function run() public {
  vm.startBroadcast();

  // Keep the same salt across different chains
  CREATE3Factory factory = new CREATE3Factory{salt: "MY_CREATE3_FACTORY"}();
  
  factory.deploy(...);
  ...

I believe the deployed address of the factory itself matters? Correct me if I'm wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions