File tree Expand file tree Collapse file tree 3 files changed +16
-0
lines changed
apps/dashboard/src/app/drops/[slug] Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 11import type { Metadata } from "next" ;
2+ import type { GaslessOptions } from "thirdweb/transaction" ;
23
34type 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
1416export 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 : "" ,
53+ relayerUrl :
54+ "https://thirdweb.engine-usw2.thirdweb.com/relayer/790e2b34-a35d-4526-9396-f2163eb6e3a5" ,
55+ } ,
4856 } ,
4957
5058 // Add more chains here
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import {
2121 useActiveAccount ,
2222 useReadContract ,
2323} from "thirdweb/react" ;
24+ import type { GaslessOptions } from "thirdweb/transaction" ;
2425
2526type 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 ? {
Original file line number Diff line number Diff 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 ) ;
You can’t perform that action at this time.
0 commit comments