+
diff --git a/apps/web/src/components/base-org/shared/TopNavigation/index.tsx b/apps/web/src/components/base-org/shared/TopNavigation/index.tsx
index b7160b2cb8..795c703805 100644
--- a/apps/web/src/components/base-org/shared/TopNavigation/index.tsx
+++ b/apps/web/src/components/base-org/shared/TopNavigation/index.tsx
@@ -1,17 +1,18 @@
'use client';
-import AnalyticsProvider from 'apps/web/contexts/Analytics';
-import Link from 'next/link';
-import logo from './assets/logo.svg';
+import { Suspense } from 'react';
import Image, { StaticImageData } from 'next/image';
+import Link from 'next/link';
+import { usePathname } from 'next/navigation';
+import AnalyticsProvider from 'apps/web/contexts/Analytics';
+import logo from 'apps/web/src/components/base-org/shared/TopNavigation/assets/logo.svg';
+import MenuDesktop from 'apps/web/src/components/base-org/shared/TopNavigation/MenuDesktop';
+import MenuMobile from 'apps/web/src/components/base-org/shared/TopNavigation/MenuMobile';
+import { DynamicWrappedGasPriceDropdown } from 'apps/web/src/components/base-org/shared/TopNavigation/GasPriceDropdown';
import {
- ConnectWalletButton,
ConnectWalletButtonVariants,
+ DynamicWrappedConnectWalletButton,
} from 'apps/web/src/components/ConnectWalletButton/ConnectWalletButton';
-import MenuDesktop from 'apps/web/src/components/base-org/shared/TopNavigation/MenuDesktop';
-import MenuMobile from 'apps/web/src/components/base-org/shared/TopNavigation/MenuMobile';
-import GasPriceDropdown from 'apps/web/src/components/base-org/shared/TopNavigation/GasPriceDropdown';
-import { Suspense } from 'react';
export type SubItem = {
name: string;
@@ -91,7 +92,11 @@ const links: TopNavigationLink[] = [
},
];
+const cryptoExcludedPaths = ['/jobs', '/about', '/ecosystem', '/getstarted'];
+
export default function TopNavigation() {
+ const pathname = usePathname();
+ const showGasDropdownAndConnectWallet = !cryptoExcludedPaths.includes(pathname ?? '');
return (
@@ -114,11 +119,13 @@ export default function TopNavigation() {
{/* Connect Wallet button */}
-
-
-
+ {showGasDropdownAndConnectWallet && (
+
+
+
+ )}
diff --git a/apps/web/src/hooks/useAggregatedDiscountValidators.ts b/apps/web/src/hooks/useAggregatedDiscountValidators.ts
index 0e80c6023e..d34263d162 100644
--- a/apps/web/src/hooks/useAggregatedDiscountValidators.ts
+++ b/apps/web/src/hooks/useAggregatedDiscountValidators.ts
@@ -8,6 +8,7 @@ import {
useCheckCBIDAttestations,
useCheckCoinbaseAttestations,
useCheckEAAttestations,
+ useDevconAttestations,
useDiscountCodeAttestations,
useSummerPassAttestations,
useTalentProtocolAttestations,
@@ -58,6 +59,7 @@ export function useAggregatedDiscountValidators(code?: string) {
const { data: TalentProtocolData, loading: loadingTalentProtocolAttestations } =
useTalentProtocolAttestations();
const { data: BaseWorldData, loading: loadingBaseWorld } = useBaseWorldAttestations();
+ const { data: DevconData, loading: loadingDevcon } = useDevconAttestations();
const loadingDiscounts =
loadingCoinbaseAttestations ||
@@ -71,7 +73,8 @@ export function useAggregatedDiscountValidators(code?: string) {
loadingBNS ||
loadingDiscountCode ||
loadingTalentProtocolAttestations ||
- loadingBaseWorld;
+ loadingBaseWorld ||
+ loadingDevcon;
const discountsToAttestationData = useMemo
(() => {
const discountMapping: MappedDiscountData = {};
@@ -153,6 +156,13 @@ export function useAggregatedDiscountValidators(code?: string) {
discountKey: validator.key,
};
}
+
+ if (DevconData && validator.discountValidator === DevconData.discountValidatorAddress) {
+ discountMapping[Discount.DEVCON] = {
+ ...DevconData,
+ discountKey: validator.key,
+ };
+ }
});
return discountMapping;
@@ -169,6 +179,7 @@ export function useAggregatedDiscountValidators(code?: string) {
DiscountCodeData,
TalentProtocolData,
BaseWorldData,
+ DevconData,
]);
return {
diff --git a/apps/web/src/hooks/useAttestations.ts b/apps/web/src/hooks/useAttestations.ts
index aab973f6e1..a849032785 100644
--- a/apps/web/src/hooks/useAttestations.ts
+++ b/apps/web/src/hooks/useAttestations.ts
@@ -12,6 +12,7 @@ import {
BASE_DOT_ETH_ERC721_DISCOUNT_VALIDATOR,
BASE_WORLD_DISCOUNT_VALIDATORS,
BUILDATHON_ERC721_DISCOUNT_VALIDATOR,
+ DEVCON_DISCOUNT_VALIDATORS,
TALENT_PROTOCOL_DISCOUNT_VALIDATORS,
USERNAME_1155_DISCOUNT_VALIDATORS,
} from 'apps/web/src/addresses/usernames';
@@ -638,3 +639,39 @@ export function useBaseWorldAttestations() {
return { data: null, loading: isLoading, error };
}
+
+const devconTokenIds = [BigInt(100), BigInt(101)];
+
+export function useDevconAttestations() {
+ const { address } = useAccount();
+ const { basenameChain } = useBasenameChain();
+
+ const discountValidatorAddress = DEVCON_DISCOUNT_VALIDATORS[basenameChain.id];
+
+ const readContractArgs = useMemo(() => {
+ if (!address) {
+ return {};
+ }
+ return {
+ address: discountValidatorAddress,
+ abi: ERC1155DiscountValidatorV2,
+ functionName: 'isValidDiscountRegistration',
+ args: [address, encodeAbiParameters([{ type: 'uint256[]' }], [devconTokenIds])],
+ };
+ }, [address, discountValidatorAddress]);
+
+ const { data: isValid, isLoading, error } = useReadContract({ ...readContractArgs, query: {} });
+ if (isValid && address) {
+ return {
+ data: {
+ discountValidatorAddress,
+ discount: Discount.DEVCON,
+ validationData: encodeAbiParameters([{ type: 'uint256[]' }], [devconTokenIds]),
+ },
+ loading: false,
+ error: null,
+ };
+ }
+
+ return { data: null, loading: isLoading, error };
+}
diff --git a/apps/web/src/utils/usernames.ts b/apps/web/src/utils/usernames.ts
index dc8a783835..43041fbe88 100644
--- a/apps/web/src/utils/usernames.ts
+++ b/apps/web/src/utils/usernames.ts
@@ -399,6 +399,7 @@ export enum Discount {
DISCOUNT_CODE = 'DISCOUNT_CODE',
TALENT_PROTOCOL = 'TALENT_PROTOCOL',
BASE_WORLD = 'BASE_WORLD',
+ DEVCON = 'DEVCON',
}
export function isValidDiscount(key: string): key is keyof typeof Discount {