File tree Expand file tree Collapse file tree 2 files changed +18
-14
lines changed
packages/thirdweb/src/wallets/smart Expand file tree Collapse file tree 2 files changed +18
-14
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " thirdweb " : patch
3+ ---
4+
5+ Skip factory entrypoint lookup for ZKsync chains
Original file line number Diff line number Diff line change @@ -80,6 +80,19 @@ export async function connectSmartAccount(
8080
8181 const options = creationOptions ;
8282 const chain = connectChain ?? options . chain ;
83+ const sponsorGas =
84+ "gasless" in options ? options . gasless : options . sponsorGas ;
85+ if ( await isZkSyncChain ( chain ) ) {
86+ return [
87+ createZkSyncAccount ( {
88+ creationOptions,
89+ connectionOptions,
90+ chain,
91+ sponsorGas,
92+ } ) ,
93+ chain ,
94+ ] ;
95+ }
8396
8497 // if factory is passed, but no entrypoint, try to resolve entrypoint from factory
8598 if ( options . factoryAddress && ! options . overrides ?. entrypointAddress ) {
@@ -110,20 +123,6 @@ export async function connectSmartAccount(
110123 const factoryAddress =
111124 options . factoryAddress ??
112125 getDefaultAccountFactory ( options . overrides ?. entrypointAddress ) ;
113- const sponsorGas =
114- "gasless" in options ? options . gasless : options . sponsorGas ;
115-
116- if ( await isZkSyncChain ( chain ) ) {
117- return [
118- createZkSyncAccount ( {
119- creationOptions,
120- connectionOptions,
121- chain,
122- sponsorGas,
123- } ) ,
124- chain ,
125- ] ;
126- }
127126
128127 const factoryContract = getContract ( {
129128 client : client ,
You can’t perform that action at this time.
0 commit comments