Skip to content

Commit 881cc71

Browse files
authored
Merge branch 'main' into greg/tool-5063-simplify-payments-docs
2 parents 1440016 + 620e294 commit 881cc71

File tree

11 files changed

+306
-75
lines changed

11 files changed

+306
-75
lines changed

.changeset/large-hornets-scream.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@thirdweb-dev/engine": patch
3+
---
4+
5+
Update to latest API

.changeset/whole-ducks-cheat.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 server wallet config types for 7702 and EOA execution

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/analytics/send-test-tx.client.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import * as z from "zod";
1010
import { engineCloudProxy } from "@/actions/proxies";
1111
import type { Project } from "@/api/projects";
1212
import { SingleNetworkSelector } from "@/components/blocks/NetworkSelectors";
13+
import { WalletAddress } from "@/components/blocks/wallet-address";
1314
import { Button } from "@/components/ui/button";
1415
import {
1516
Dialog,
@@ -31,7 +32,6 @@ import { useAllChainsData } from "@/hooks/chains/allChains";
3132
import { useDashboardRouter } from "@/lib/DashboardRouter";
3233
import { TryItOut } from "../server-wallets/components/try-it-out";
3334
import type { Wallet } from "../server-wallets/wallet-table/types";
34-
import { SmartAccountCell } from "../server-wallets/wallet-table/wallet-table-ui.client";
3535

3636
const formSchema = z.object({
3737
secretKey: z.string().min(1, "Secret key is required"),
@@ -193,9 +193,9 @@ function SendTestTransactionModal(props: {
193193
<SelectTrigger className="w-full">
194194
<SelectValue>
195195
<div className="flex items-center gap-2">
196-
<SmartAccountCell
196+
<WalletAddress
197197
client={props.client}
198-
wallet={selectedWallet}
198+
address={selectedWallet.address}
199199
/>
200200
<span className="text-muted-foreground text-sm">
201201
{selectedWallet.metadata.label}
@@ -207,7 +207,10 @@ function SendTestTransactionModal(props: {
207207
{props.wallets.map((wallet, index) => (
208208
<SelectItem key={wallet.address} value={index.toString()}>
209209
<div className="flex items-center gap-2">
210-
<SmartAccountCell client={props.client} wallet={wallet} />
210+
<WalletAddress
211+
client={props.client}
212+
address={wallet.address}
213+
/>
211214
<span className="text-muted-foreground text-sm">
212215
{wallet.metadata.label}
213216
</span>

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/analytics/tx-table/tx-table-ui.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -331,18 +331,14 @@ function TxStatusCell(props: { transaction: Transaction }) {
331331
const { errorMessage } = transaction;
332332
const minedAt = transaction.confirmedAt;
333333
const status =
334-
(transaction.executionResult?.status as TransactionStatus) ?? null;
334+
(transaction.executionResult?.status as TransactionStatus) ?? "QUEUED";
335335

336336
const onchainStatus =
337337
transaction.executionResult &&
338338
"onchainStatus" in transaction.executionResult
339339
? transaction.executionResult.onchainStatus
340340
: null;
341341

342-
if (!status) {
343-
return null;
344-
}
345-
346342
const tooltip =
347343
onchainStatus !== "REVERTED"
348344
? errorMessage

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/transactions/server-wallets/wallet-table/wallet-table-ui.client.tsx

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ export function ServerWalletsTableUI({
5858
totalPages: number;
5959
client: ThirdwebClient;
6060
}) {
61-
const [showSigners, setShowSigners] = useState(false);
62-
const showSignersId = useId();
61+
const [showContractWallets, setShowContractWallets] = useState(false);
62+
const showContractWalletsId = useId();
6363
return (
6464
<div className="overflow-hidden rounded-lg border border-border bg-card">
65-
<div className="flex flex-row items-center gap-4 px-6 py-6">
66-
<div className="flex flex-1 flex-col gap-4 rounded-lg rounded-b-none lg:flex-row lg:justify-between">
65+
<div className="flex flex-col lg:flex-row items-center gap-4 px-6 py-6">
66+
<div className="flex flex-1 flex-col gap-4 rounded-lg rounded-b-none items-start">
6767
<div>
6868
<h2 className="font-semibold text-xl tracking-tight">
6969
Server Wallets
@@ -73,28 +73,36 @@ export function ServerWalletsTableUI({
7373
</p>
7474
</div>
7575
</div>
76-
<div className="flex items-center justify-end gap-2">
77-
<label className="cursor-pointer text-sm" htmlFor={showSignersId}>
78-
Show Signer Addresses
79-
</label>
80-
<Switch
81-
checked={showSigners}
82-
id={showSignersId}
83-
onCheckedChange={() => setShowSigners(!showSigners)}
76+
<div className="flex flex-col gap-4 items-end">
77+
<CreateServerWallet
78+
managementAccessToken={managementAccessToken}
79+
project={project}
80+
teamSlug={teamSlug}
8481
/>
8582
</div>
86-
<CreateServerWallet
87-
managementAccessToken={managementAccessToken}
88-
project={project}
89-
teamSlug={teamSlug}
83+
</div>
84+
85+
<div className="flex items-center justify-end gap-2 py-4">
86+
<label
87+
className="cursor-pointer text-sm text-muted-foreground"
88+
htmlFor={showContractWalletsId}
89+
>
90+
Show ERC4337 Smart Account Addresses
91+
</label>
92+
<Switch
93+
checked={showContractWallets}
94+
id={showContractWalletsId}
95+
onCheckedChange={() => setShowContractWallets(!showContractWallets)}
9096
/>
9197
</div>
9298

9399
<TableContainer className="rounded-none border-x-0 border-b-0">
94100
<Table>
95101
<TableHeader>
96102
<TableRow>
97-
<TableHead>Address</TableHead>
103+
<TableHead>
104+
{showContractWallets ? "Smart Account Address" : "EOA Address"}
105+
</TableHead>
98106
<TableHead>Label</TableHead>
99107
<TableHead className="text-right">Created At</TableHead>
100108
<TableHead className="text-right">Updated At</TableHead>
@@ -105,10 +113,10 @@ export function ServerWalletsTableUI({
105113
{wallets.map((wallet) => (
106114
<TableRow className="hover:bg-accent/50" key={wallet.id}>
107115
<TableCell>
108-
{showSigners ? (
109-
<WalletAddress address={wallet.address} client={client} />
110-
) : (
116+
{showContractWallets ? (
111117
<SmartAccountCell client={client} wallet={wallet} />
118+
) : (
119+
<WalletAddress address={wallet.address} client={client} />
112120
)}
113121
</TableCell>
114122
<TableCell>{wallet.metadata.label || "none"}</TableCell>
@@ -197,7 +205,7 @@ export function ServerWalletsTableUI({
197205
);
198206
}
199207

200-
export function SmartAccountCell({
208+
function SmartAccountCell({
201209
wallet,
202210
client,
203211
}: {

packages/engine/src/client/sdk.gen.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,13 @@ export const signTypedData = <ThrowOnError extends boolean = false>(
169169

170170
/**
171171
* Read Contract
172-
* Read from multiple smart contracts using multicall
172+
* Read from smart contracts with intelligent execution strategy:
173+
* - Single calls: Always executed directly for efficiency
174+
* - Multiple calls: Uses multicall by default, or direct calls if disabled
175+
* - Failed preparations: Returns preparation errors directly
176+
*
177+
* If multicall is not specified, it will be used by default. In case of multicall related errors, engine will fallback to direct calls.
178+
* Only in the case where multicall is explicitly enabled, engine will not fallback to direct calls.
173179
*/
174180
export const readContract = <ThrowOnError extends boolean = false>(
175181
options: Options<ReadContractData, ThrowOnError>,
@@ -268,8 +274,8 @@ export const listAccounts = <ThrowOnError extends boolean = false>(
268274
};
269275

270276
/**
271-
* Create Server Wallet
272-
* Create a new engine server wallet. This is a helper route for creating a new EOA with your KMS provider, provided as a convenient alternative to creating an EOA directly with your KMS provider. Your KMS credentials are not stored, and usage of created accounts require your KMS credentials to be sent with requests.
277+
* Get or Create Server Wallet
278+
* Create a new engine server wallet or retrieve an existing one. If the EOA already exists for the given label, it will be returned without creating a new one.
273279
*/
274280
export const createAccount = <ThrowOnError extends boolean = false>(
275281
options?: Options<CreateAccountData, ThrowOnError>,

0 commit comments

Comments
 (0)