File tree Expand file tree Collapse file tree 7 files changed +42
-4
lines changed
playground-web/src/components/account-abstraction
portal/src/app/typescript/v5
transaction/actions/zksync Expand file tree Collapse file tree 7 files changed +42
-4
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " thirdweb " : patch
3
+ ---
4
+
5
+ Update default zk chains
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ export function SponsoredTxZksyncPreview() {
67
67
{ smartAccount ? (
68
68
< div className = "flex flex-col justify-center p-2" >
69
69
< p className = "mb-2 text-center font-semibold" >
70
- You own { ownedNfts ?. [ 0 ] ?. quantityOwned . toString ( ) || "0" }
70
+ You own { ownedNfts ?. [ 0 ] ?. quantityOwned . toString ( ) || "0" } { " " }
71
71
Kittens
72
72
</ p >
73
73
< TransactionButton
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ export function SponsoredTxPreview() {
69
69
{ smartAccount ? (
70
70
< div className = "flex flex-col justify-center p-2" >
71
71
< p className = "mb-2 text-center font-semibold" >
72
- You own { ownedNfts ?. [ 0 ] ?. quantityOwned . toString ( ) || "0" }
72
+ You own { ownedNfts ?. [ 0 ] ?. quantityOwned . toString ( ) || "0" } { " " }
73
73
Kittens
74
74
</ p >
75
75
< TransactionButton
Original file line number Diff line number Diff line change @@ -139,9 +139,15 @@ export const sidebar: SideBar = {
139
139
} ,
140
140
...[
141
141
"smartWallet" ,
142
+ "predictAddress" ,
143
+ "createAndSignUserOp" ,
144
+ "createUnsignedUserOp" ,
142
145
"signUserOp" ,
143
146
"bundleUserOp" ,
147
+ "getUserOpReceipt" ,
144
148
"waitForUserOpReceipt" ,
149
+ "getUserOpGasFees" ,
150
+ "estimateUserOpGas" ,
145
151
] . map ( ( name ) => ( {
146
152
name,
147
153
href : `${ slug } /${ name } ` ,
@@ -155,7 +161,6 @@ export const sidebar: SideBar = {
155
161
"getAccountsOfSigner" ,
156
162
"getAllActiveSigners" ,
157
163
"getPermissionsForSigner" ,
158
- "createUnsignedUserOp" ,
159
164
] . map ( ( name ) => ( {
160
165
name,
161
166
href : `${ slug } /erc4337/${ name } ` ,
Original file line number Diff line number Diff line change @@ -133,6 +133,10 @@ export async function populateEip712Transaction(
133
133
maxFeePerGas = baseFee * 2n ; // bumping the base fee per gas to ensure fast inclusion
134
134
maxPriorityFeePerGas = toBigInt ( result . max_priority_fee_per_gas ) || 1n ;
135
135
gasPerPubdata = toBigInt ( result . gas_per_pubdata_limit ) * 2n ; // doubling for fast inclusion;
136
+ if ( gasPerPubdata < 50000n ) {
137
+ // enforce a minimum gas per pubdata limit
138
+ gasPerPubdata = 50000n ;
139
+ }
136
140
}
137
141
138
142
// serialize the transaction (with fees, gas, nonce)
Original file line number Diff line number Diff line change @@ -16,7 +16,8 @@ export async function isZkSyncChain(chain: Chain) {
16
16
chain . id === 388 ||
17
17
chain . id === 4654 ||
18
18
chain . id === 333271 ||
19
- chain . id === 37111
19
+ chain . id === 37111 ||
20
+ chain . id === 978658
20
21
) {
21
22
return true ;
22
23
}
Original file line number Diff line number Diff line change @@ -148,5 +148,28 @@ describe.runIf(process.env.TW_SECRET_KEY).todo(
148
148
console . log ( tx . transactionHash ) ;
149
149
expect ( tx . transactionHash . length ) . toBe ( 66 ) ;
150
150
} ) ;
151
+
152
+ it ( "should send a transaction on Treasure Topaz Testnet" , async ( ) => {
153
+ const sw = smartWallet ( {
154
+ chain : defineChain ( 978658 ) ,
155
+ sponsorGas : true ,
156
+ } ) ;
157
+ const account = await sw . connect ( {
158
+ client : TEST_CLIENT ,
159
+ personalAccount,
160
+ } ) ;
161
+ const tx = await sendTransaction ( {
162
+ transaction : prepareTransaction ( {
163
+ chain : defineChain ( 978658 ) ,
164
+ client : TEST_CLIENT ,
165
+ to : account . address ,
166
+ value : BigInt ( 0 ) ,
167
+ data : "0x" ,
168
+ } ) ,
169
+ account : account ,
170
+ } ) ;
171
+ console . log ( tx . transactionHash ) ;
172
+ expect ( tx . transactionHash . length ) . toBe ( 66 ) ;
173
+ } ) ;
151
174
} ,
152
175
) ;
You can’t perform that action at this time.
0 commit comments