Skip to content

Commit a39a5b6

Browse files
feat: add new zksync chain ID
1 parent cb64067 commit a39a5b6

File tree

6 files changed

+19
-4
lines changed

6 files changed

+19
-4
lines changed

.changeset/real-insects-fix.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
Update default zk chains

apps/playground-web/src/components/account-abstraction/sponsored-tx-zksync.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export function SponsoredTxZksyncPreview() {
6767
{smartAccount ? (
6868
<div className="flex flex-col justify-center p-2">
6969
<p className="mb-2 text-center font-semibold">
70-
You own {ownedNfts?.[0]?.quantityOwned.toString() || "0"}
70+
You own {ownedNfts?.[0]?.quantityOwned.toString() || "0"}{" "}
7171
Kittens
7272
</p>
7373
<TransactionButton

apps/playground-web/src/components/account-abstraction/sponsored-tx.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export function SponsoredTxPreview() {
6969
{smartAccount ? (
7070
<div className="flex flex-col justify-center p-2">
7171
<p className="mb-2 text-center font-semibold">
72-
You own {ownedNfts?.[0]?.quantityOwned.toString() || "0"}
72+
You own {ownedNfts?.[0]?.quantityOwned.toString() || "0"}{" "}
7373
Kittens
7474
</p>
7575
<TransactionButton

apps/portal/src/app/typescript/v5/sidebar.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,15 @@ export const sidebar: SideBar = {
139139
},
140140
...[
141141
"smartWallet",
142+
"predictAddress",
143+
"createAndSignUserOp",
144+
"createUnsignedUserOp",
142145
"signUserOp",
143146
"bundleUserOp",
147+
"getUserOpReceipt",
144148
"waitForUserOpReceipt",
149+
"getUserOpGasFees",
150+
"estimateUserOpGas",
145151
].map((name) => ({
146152
name,
147153
href: `${slug}/${name}`,
@@ -155,7 +161,6 @@ export const sidebar: SideBar = {
155161
"getAccountsOfSigner",
156162
"getAllActiveSigners",
157163
"getPermissionsForSigner",
158-
"createUnsignedUserOp",
159164
].map((name) => ({
160165
name,
161166
href: `${slug}/erc4337/${name}`,

packages/thirdweb/src/transaction/actions/zksync/send-eip712-transaction.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ export async function populateEip712Transaction(
133133
maxFeePerGas = baseFee * 2n; // bumping the base fee per gas to ensure fast inclusion
134134
maxPriorityFeePerGas = toBigInt(result.max_priority_fee_per_gas) || 1n;
135135
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+
}
136140
}
137141

138142
// serialize the transaction (with fees, gas, nonce)

packages/thirdweb/src/utils/any-evm/zksync/isZkSyncChain.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ export async function isZkSyncChain(chain: Chain) {
1616
chain.id === 388 ||
1717
chain.id === 4654 ||
1818
chain.id === 333271 ||
19-
chain.id === 37111
19+
chain.id === 37111 ||
20+
chain.id === 978658
2021
) {
2122
return true;
2223
}

0 commit comments

Comments
 (0)