Skip to content

Commit 62d3b97

Browse files
always use default factory
1 parent 0790a5e commit 62d3b97

File tree

2 files changed

+12
-17
lines changed

2 files changed

+12
-17
lines changed

src/app/constants.ts

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,33 +7,31 @@ import { SmartWalletOptions } from "thirdweb/wallets";
77
const clientId = process.env.NEXT_PUBLIC_TEMPLATE_CLIENT_ID;
88

99
if (!clientId) {
10-
throw new Error("No client ID provided");
10+
throw new Error("No client ID provided");
1111
}
1212

1313
export const client = createThirdwebClient({
14-
clientId: clientId,
14+
clientId: clientId,
1515
});
1616

1717
export const chain = baseSepolia;
18-
export const factoryAddress = "0x7b5ba9D46b53aae55e2c2E9b38d9AfF9a0b158F8";
1918
export const tokenDropAddress = "0xd64A548A82c190083707CBEFD26958E5e6551D18";
2019
export const editionDropAddress = "0x638263e3eAa3917a53630e61B1fBa685308024fa";
2120
export const editionDropTokenId = 0n;
2221

2322
export const editionDropContract = getContract({
24-
address: editionDropAddress,
25-
chain,
26-
client,
23+
address: editionDropAddress,
24+
chain,
25+
client,
2726
});
2827

2928
export const tokenDropContract = getContract({
30-
address: tokenDropAddress,
31-
chain,
32-
client,
29+
address: tokenDropAddress,
30+
chain,
31+
client,
3332
});
3433

3534
export const accountAbstraction: SmartWalletOptions = {
36-
chain,
37-
factoryAddress,
38-
sponsorGas: true,
35+
chain,
36+
sponsorGas: true,
3937
};

src/app/multichain/page.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
useActiveAccount,
99
useReadContract,
1010
} from "thirdweb/react";
11-
import { client, editionDropTokenId } from "../constants";
11+
import { accountAbstraction, client, editionDropTokenId } from "../constants";
1212
import Link from "next/link";
1313
import { arbitrumSepolia, baseSepolia } from "thirdweb/chains";
1414
import { ThirdwebContract, getContract } from "thirdweb";
@@ -25,10 +25,7 @@ const GaslessHome: React.FC = () => {
2525
</h1>
2626
<ConnectButton
2727
client={client}
28-
accountAbstraction={{
29-
chain: baseSepolia,
30-
sponsorGas: true,
31-
}}
28+
accountAbstraction={accountAbstraction}
3229
connectModal={{
3330
size: "compact",
3431
}}

0 commit comments

Comments
 (0)