Skip to content

Commit 7dda2e3

Browse files
working state
1 parent d5554e4 commit 7dda2e3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/thirdweb/src/contract/deployment/zksync/zkDeployProxy.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ import {
66
} from "../../../utils/any-evm/zksync/constants.js";
77
import { isContractDeployed } from "../../../utils/bytecode/is-contract-deployed.js";
88
import { resolvePromisedValue } from "../../../utils/promise/resolve-promised-value.js";
9+
import { randomBytesHex } from "../../../utils/random.js";
910
import type { ClientAndChainAndAccount } from "../../../utils/types.js";
1011
import type { ThirdwebContract } from "../../contract.js";
11-
import { zkDeployContract } from "./zkDeployContract.js";
12+
import { zkDeployContractDeterministic } from "./zkDeployDeterministic.js";
1213

1314
/**
1415
* @internal
@@ -39,7 +40,7 @@ export async function zkDeployProxy(
3940
}
4041
console.log("deploying tw proxy");
4142
// deploy tw proxy of the implementation
42-
const proxyAddress = await zkDeployContract({
43+
const proxyAddress = await zkDeployContractDeterministic({
4344
client: options.client,
4445
chain: options.chain,
4546
account: options.account,
@@ -49,8 +50,7 @@ export async function zkDeployProxy(
4950
_logic: implementationAddress,
5051
_data: await encode(options.initializeTransaction),
5152
},
52-
salt: options.salt,
53-
deploymentType: "create2",
53+
salt: options.salt || randomBytesHex(32),
5454
});
5555

5656
// return address of proxy

0 commit comments

Comments
 (0)