Skip to content

Commit eeb993d

Browse files
feat: optimize zksync contract deployment and bytecode handling (#4902)
1 parent 367a270 commit eeb993d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

packages/thirdweb/src/extensions/prebuilts/get-required-transactions.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,11 @@ export async function getAllDefaultConstructorParamsForImplementation(args: {
210210
client: ThirdwebClient;
211211
}) {
212212
const { chain, client } = args;
213+
const isZkSync = await isZkSyncChain(chain);
214+
if (isZkSync) {
215+
// zksync contracts dont need these implementation constructor params
216+
return {};
217+
}
213218
const [forwarder, weth] = await Promise.all([
214219
computePublishedContractAddress({
215220
chain,

packages/thirdweb/src/utils/any-evm/deploy-metadata.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export async function fetchBytecodeFromCompilerMetadata(options: {
8080
async () => {
8181
const isZksolc = await isZkSyncChain(chain);
8282
const bytecodeUri = isZksolc
83-
? compilerMetadata.compilers?.zksolc[0]?.bytecodeUri
83+
? compilerMetadata.compilers?.zksolc?.[0]?.bytecodeUri
8484
: compilerMetadata.bytecodeUri;
8585

8686
if (!bytecodeUri) {

0 commit comments

Comments
 (0)