@@ -6,9 +6,10 @@ import {
66} from "../../../utils/any-evm/zksync/constants.js" ;
77import { isContractDeployed } from "../../../utils/bytecode/is-contract-deployed.js" ;
88import { resolvePromisedValue } from "../../../utils/promise/resolve-promised-value.js" ;
9+ import { randomBytesHex } from "../../../utils/random.js" ;
910import type { ClientAndChainAndAccount } from "../../../utils/types.js" ;
1011import 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