Skip to content
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

Add ImmutableCreate2Factory supprt #532

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ifelsedeveloper
Copy link
Contributor

@ifelsedeveloper ifelsedeveloper commented Apr 5, 2024

Support for Another Factory Type in Create2 Deployment

I have added support for another factory type for create2 deployment. You need to specify this in the root hardhat config as follows:

deterministicDeployment: {
    '137': {
        factory: '0xCAcc283126Cc22204f6538dA7751E1eEb29f4C48'
    }
}
const deployResult: DeployResult = await deploy("TestDeployContract", {
        from: deployer,
        log: true,
        args: [100, 200], // Unlock timestamp in seconds
        waitConfirmations: 1,
        deterministicDeployment: "0x11111",
    });

I have tested deploying contracts with and without proxy

const deployResult: DeployResult = await deploy('UpgradeableTestDeploy', {
    from: deployer,
    log: true,
    waitConfirmations: 1,
    deterministicDeployment: "0x0a0a0a",
    proxy: {
      execute: {
        init: {
          methodName: "initialize",
          args: [100, 200],
        },
      },
      proxyContract: "OpenZeppelinTransparentProxy",
    },
  });

@ifelsedeveloper
Copy link
Contributor Author

I have also published the package [email protected]
The same contract is used by opensea
https://polygonscan.com/address/0x0000000000ffe8b47b3e2130213b802212439497#code

@ifelsedeveloper
Copy link
Contributor Author

@wighawag Hi
Can you find some time to check pull request?

@wighawag
Copy link
Owner

wighawag commented May 2, 2024

Hi @ifelsedeveloper can you explain the rationale behind this PR ? What it do that current factory deployment setup could not do ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants