Skip to content

Commit 2e68caa

Browse files
committed
update
1 parent 5de5c44 commit 2e68caa

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

apps/dashboard/src/app/drops/[slug]/data.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { Metadata } from "next";
2+
import type { GaslessOptions } from "thirdweb/transaction";
23

34
type DropPageData = {
45
slug: string;
@@ -9,6 +10,7 @@ type DropPageData = {
910
// If not defined, we will use the image of the NFT or contract's image
1011
thumbnail?: string;
1112
metadata: Metadata;
13+
gasless?: GaslessOptions;
1214
} & ({ type: "erc1155"; tokenId: bigint } | { type: "erc721" });
1315

1416
export const DROP_PAGES: DropPageData[] = [
@@ -45,6 +47,12 @@ export const DROP_PAGES: DropPageData[] = [
4547
"This exclusive commemorative NFT marks the official launch of ZERϴ's mainnet and our exciting partnership with thirdweb. Own a piece of this milestone in blockchain history as we make onchain transactions free with zero.network",
4648
},
4749
},
50+
gasless: {
51+
provider: "engine",
52+
relayerForwarderAddress: "0x8ef65cb8a0bc22d61b6f1431e16aa8aca355c771",
53+
relayerUrl:
54+
"https://thirdweb.engine-usw2.thirdweb.com/relayer/790e2b34-a35d-4526-9396-f2163eb6e3a5",
55+
},
4856
},
4957

5058
// Add more chains here

apps/dashboard/src/app/drops/[slug]/mint-ui.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import {
2121
useActiveAccount,
2222
useReadContract,
2323
} from "thirdweb/react";
24+
import type { GaslessOptions } from "thirdweb/transaction";
2425

2526
type Props = {
2627
contract: ThirdwebContract;
@@ -36,6 +37,7 @@ type Props = {
3637
currencySymbol: string | null;
3738
noActiveClaimCondition: false;
3839
quantityLimitPerWallet: bigint;
40+
gasless?: GaslessOptions;
3941
}
4042
| { noActiveClaimCondition: true }
4143
);
@@ -181,6 +183,11 @@ export function NftMint(props: Props) {
181183
contractAddress={props.contract.address}
182184
chain={props.contract.chain}
183185
client={props.contract.client}
186+
gasless={
187+
props.noActiveClaimCondition === false
188+
? props.gasless
189+
: undefined
190+
}
184191
claimParams={
185192
props.type === "erc1155"
186193
? {

apps/dashboard/src/app/drops/[slug]/page.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ export default async function DropPage({
112112
pricePerToken={pricePerToken}
113113
noActiveClaimCondition={false}
114114
quantityLimitPerWallet={claimCondition.quantityLimitPerWallet}
115+
gasless={project.gasless}
115116
{...project}
116117
/>
117118
);

0 commit comments

Comments
 (0)