Skip to content

Commit

Permalink
Reorder contract deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
ilitteri committed Dec 5, 2023
1 parent b95b50d commit 287d4c7
Show file tree
Hide file tree
Showing 5 changed files with 3,329 additions and 5,091 deletions.
2 changes: 1 addition & 1 deletion ExecutionHelper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"solady": "^0.0.138",
"ts-node": "^10.9.1",
"typescript": "^4.9.4",
"zksync-web3": "^0.14.3"
"zksync-web3": "^0.16.0"
},
"dependencies": {
"@openzeppelin/contracts": "^4.9.3",
Expand Down
12 changes: 7 additions & 5 deletions ExecutionHelper/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1690,7 +1690,7 @@ ethereumjs-util@^6.0.0, ethereumjs-util@^6.2.1:
ethjs-util "0.1.6"
rlp "^2.2.3"

ethers@^5.7.1, ethers@^5.7.2:
ethers@^5.7.1, ethers@^5.7.2, ethers@~5.7.0:
version "5.7.2"
resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e"
integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==
Expand Down Expand Up @@ -3307,7 +3307,9 @@ yocto-queue@^0.1.0:
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==

zksync-web3@^0.14.3:
version "0.14.4"
resolved "https://registry.yarnpkg.com/zksync-web3/-/zksync-web3-0.14.4.tgz#0b70a7e1a9d45cc57c0971736079185746d46b1f"
integrity sha512-kYehMD/S6Uhe1g434UnaMN+sBr9nQm23Ywn0EUP5BfQCsbjcr3ORuS68PosZw8xUTu3pac7G6YMSnNHk+fwzvg==
zksync-web3@^0.16.0:
version "0.16.0"
resolved "https://registry.yarnpkg.com/zksync-web3/-/zksync-web3-0.16.0.tgz#407b258e61923d104864cff284bb54dc8b6af753"
integrity sha512-ER/qDpuRkoHrqwi2f4RCP6HXCQP1KB9o7Ih2K7h+QzfCSyDRL0apPMT9LkVQspeIeqRoXhl+1tit3vQdDIGe4w==
dependencies:
ethers "~5.7.0"
33 changes: 5 additions & 28 deletions deploy/seaport-deployer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,35 +28,12 @@ export default async function () {
// const salt = getSalt(wallet.address);

const immutableCreate2 = await deployCreate2Contract(wallet, "ImmutableCreate2Factory");
const conduitController = await deployCreate2Contract(wallet, "ConduitController");
const conduit = await deployCreate2Contract(wallet, "Conduit");
// TODO: This should be conduit controller address instead of conduit address.
// const transferHelper = await deployCreate2Contract(wallet, "TransferHelper", [conduit.address]);


// TODO: This should be uncommented when deploySafeCreate2Contract its working
// // Deploy with safeCreate2
// const transferHelper_address = await deploySafeCreate2Contract(
// provider,
// transferHelper,
// salt,
// immutableCreate2
// );

// // Deploy Seaport contract
// const seaportArtifact = "Seaport";
// const seaport = await deployContract(deployer, wallet, seaportArtifact, [
// coduitController.address,
// ]);

// TODO: This should be uncommented when deploySafeCreate2Contract its working
// // Deploy with safeCreate2
// const seaport_address = await deploySafeCreate2Contract(
// provider,
// seaport,
// salt,
// immutableCreate2
// );
const conduitController = await deployCreate2Contract(wallet, "ConduitController");
const transferHelper = await deployCreate2Contract(wallet, "TransferHelper", [conduitController.address]);
// const seaportValidatorHelper = await deployCreate2Contract(wallet, "SeaportValidatorHelper");

// const seaport = await deployCreate2Contract(wallet, "Seaport", [conduitController.address]);

// // Deploy navigator contracts

Expand Down
2 changes: 1 addition & 1 deletion deploy/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export const deployContract = async (deployer: Deployer, wallet: Wallet, contrac

export async function deployCreate2Contract(wallet: Wallet, contractName: string, args: any[] = [], overrides: Object = {}): Promise<Contract> {
const artifact = await hre.artifacts.readArtifact(contractName);
const factory = new ContractFactory(artifact.abi, artifact.bytecode, wallet, "create");
const factory = new ContractFactory(artifact.abi, artifact.bytecode, wallet, "create2");
const contract = (await factory.deploy(...args, {
customData: { salt: ethers.utils.keccak256(ethers.utils.toUtf8Bytes("LambdaClass"))},
gasLimit: 80000000,
Expand Down
Loading

0 comments on commit 287d4c7

Please sign in to comment.