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(
80
80
81
81
const options = creationOptions ;
82
82
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
+ }
83
96
84
97
// if factory is passed, but no entrypoint, try to resolve entrypoint from factory
85
98
if ( options . factoryAddress && ! options . overrides ?. entrypointAddress ) {
@@ -110,20 +123,6 @@ export async function connectSmartAccount(
110
123
const factoryAddress =
111
124
options . factoryAddress ??
112
125
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
- }
127
126
128
127
const factoryContract = getContract ( {
129
128
client : client ,
You can’t perform that action at this time.
0 commit comments