Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# dev
# codegen
CODEGEN_POCO_SUBGRAPH_URL="https://thegraph.arbitrum.iex.ec/api/subgraphs/id/B1comLe9SANBLrjdnoNTJSubbeC7cY7EoNu6zD82HeKy"
CODEGEN_DATAPROTECTOR_SUBGRAPH_URL="https://thegraph.arbitrum.iex.ec/api/subgraphs/id/Ep5zs5zVr4tDiVuQJepUu51e5eWYJpka624X4DMBxe3u"

VITE_POCO_SUBGRAPH_URL="https://thegraph.iex.ec/subgraphs/name/bellecour/poco-v5"
VITE_DATAPROTECTOR_SUBGRAPH_URL="https://thegraph.iex.ec/subgraphs/name/bellecour/dataprotector-v2"
# dev
VITE_REOWN_PROJECT_ID=
VITE_CLERK_PUBLISHABLE_KEY=
VITE_FAUCET_API_URL = 'https://dev-rlc-faucet.iex.ec'
VITE_FAUCET_API_URL='https://dev-rlc-faucet.iex.ec'

# prod

VITE_FAUCET_API_URL = 'https://rlc-faucet.iex.ec'
VITE_FAUCET_API_URL='https://rlc-faucet.iex.ec'
8 changes: 2 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:

- name: Generate GraphQL types
env:
VITE_POCO_SUBGRAPH_URL: ${{ secrets.VITE_POCO_SUBGRAPH_URL }}
VITE_DATAPROTECTOR_SUBGRAPH_URL: ${{ secrets.VITE_DATAPROTECTOR_SUBGRAPH_URL }}
CODEGEN_POCO_SUBGRAPH_URL: ${{ vars.CODEGEN_POCO_SUBGRAPH_URL }}
CODEGEN_DATAPROTECTOR_SUBGRAPH_URL: ${{ vars.CODEGEN_DATAPROTECTOR_SUBGRAPH_URL }}
run: npm run codegen

- name: Check Prettier
Expand All @@ -39,8 +39,6 @@ jobs:

- name: Build application
env:
VITE_POCO_SUBGRAPH_URL: ${{ secrets.VITE_POCO_SUBGRAPH_URL }}
VITE_DATAPROTECTOR_SUBGRAPH_URL: ${{ secrets.VITE_DATAPROTECTOR_SUBGRAPH_URL }}
VITE_REOWN_PROJECT_ID: ${{ secrets.VITE_REOWN_PROJECT_ID }}
VITE_CLERK_PUBLISHABLE_KEY: ${{ secrets.VITE_CLERK_PUBLISHABLE_KEY }}
VITE_FAUCET_API_URL: ${{ secrets.VITE_FAUCET_API_URL }}
Expand All @@ -51,8 +49,6 @@ jobs:

- name: Run Playwright Tests
env:
VITE_POCO_SUBGRAPH_URL: ${{ secrets.VITE_POCO_SUBGRAPH_URL }}
VITE_DATAPROTECTOR_SUBGRAPH_URL: ${{ secrets.VITE_DATAPROTECTOR_SUBGRAPH_URL }}
VITE_REOWN_PROJECT_ID: ${{ secrets.VITE_REOWN_PROJECT_ID }}
VITE_CLERK_PUBLISHABLE_KEY: ${{ secrets.VITE_CLERK_PUBLISHABLE_KEY }}
VITE_FAUCET_API_URL: ${{ secrets.VITE_FAUCET_API_URL }}
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## Description

**iExec Explorer** is a modern web app to explore the iExec protocol across multiple supported blockchains (Bellecour, Arbitrum Sepolia, etc.). It lets you search, browse, and analyze deals, tasks, apps, datasets, workerpools, transactions, and accounts, with an integrated wallet manager.
**iExec Explorer** is a modern web app to explore the iExec protocol across multiple supported blockchains (Arbitrum, Arbitrum Sepolia, etc.). It lets you search, browse, and analyze deals, tasks, apps, datasets, workerpools, transactions, and accounts, with an integrated wallet manager.

## Main Features

Expand Down Expand Up @@ -77,7 +77,6 @@ npm run preview
## Links
- [iExec Website](https://www.iex.ec/)
- [iExec Docs](https://docs.iex.ec/)
- [Blockscout Bellecour](https://blockscout-bellecour.iex.ec/)

## Contributing
Contributions are welcome! Please open issues or pull requests.
Expand Down
22 changes: 11 additions & 11 deletions codegenDataprotector.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
import type { CodegenConfig } from '@graphql-codegen/cli'
import type { CodegenConfig } from '@graphql-codegen/cli';
import * as dotenv from 'dotenv';

dotenv.config();

const config: CodegenConfig = {
schema: process.env.VITE_DATAPROTECTOR_SUBGRAPH_URL,
schema: process.env.CODEGEN_DATAPROTECTOR_SUBGRAPH_URL,
documents: ['src/**/*DpQuery.ts'],
ignoreNoDocuments: true,
generates: {
'./src/graphql/dataprotector/': {
preset: 'client',
config: {
documentMode: 'string'
}
documentMode: 'string',
},
},
'./src/graphql/dataprotector/schema.graphql': {
plugins: ['schema-ast'],
config: {
includeDirectives: true
}
}
}
}
export default config
includeDirectives: true,
},
},
},
};

export default config;
24 changes: 12 additions & 12 deletions codegenPoco.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
import type { CodegenConfig } from '@graphql-codegen/cli'
import type { CodegenConfig } from '@graphql-codegen/cli';
import * as dotenv from 'dotenv';

dotenv.config();

const config: CodegenConfig = {
schema: process.env.VITE_POCO_SUBGRAPH_URL,
documents: ['src/**/*.tsx', "src/**/*.ts", '!src/**/*DpQuery.ts'],
schema: process.env.CODEGEN_POCO_SUBGRAPH_URL,
documents: ['src/**/*.tsx', 'src/**/*.ts', '!src/**/*DpQuery.ts'],
ignoreNoDocuments: true,
generates: {
'./src/graphql/poco/': {
preset: 'client',
config: {
documentMode: 'string'
}
documentMode: 'string',
},
},
'./src/graphql/poco/schema.graphql': {
plugins: ['schema-ast'],
config: {
includeDirectives: true
}
}
}
}
export default config
includeDirectives: true,
},
},
},
};

export default config;
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"graphql": "^16.12.0",
"iexec": "^8.24.0",
"iexec": "^9.0.1",
"lucide-react": "^0.556.0",
"prettier-plugin-tailwindcss": "^0.7.2",
"react": "^19.2.1",
Expand Down
21 changes: 1 addition & 20 deletions src/components/SmartLinkGroup.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import { useQuery } from '@tanstack/react-query';
import { Link } from '@tanstack/react-router';
import { ExternalLink } from 'lucide-react';
import CopyButton from '@/components/CopyButton';
import { Button } from '@/components/ui/button';
import { getIExec, getReadonlyIExec } from '@/externals/iexecSdkClient';
import useUserStore from '@/stores/useUser.store';
import { isValidAddress } from '@/utils/addressOrIdCheck';
import { getBlockExplorerUrl, getChainFromId } from '@/utils/chain.utils';
import { truncateAddress } from '@/utils/truncateAddress';
import {
Expand Down Expand Up @@ -40,7 +37,7 @@ export default function SmartLinkGroup({
isCurrentPage = false,
showAddressOrIdAndLabel = false,
}: SmartLinkGroupProps) {
const { chainId, isConnected } = useUserStore();
const { chainId } = useUserStore();
const basePath = {
deal: 'deal',
task: 'task',
Expand All @@ -52,20 +49,6 @@ export default function SmartLinkGroup({
order: 'order',
};

const { data: ens } = useQuery({
queryKey: ['ens', addressOrId],
queryFn: async () => {
const iexec = isConnected ? await getIExec() : getReadonlyIExec(chainId!);
const resolved = await iexec.ens.lookupAddress(addressOrId);
if (!resolved) {
return null;
}
return resolved;
},
enabled: !!chainId && isValidAddress(addressOrId),
staleTime: Infinity,
});

const blockExplorerPath = {
deal: `tx/${addressOrId}`,
dataset: `address/${addressOrId}`,
Expand All @@ -91,7 +74,6 @@ export default function SmartLinkGroup({
: truncateAddress(addressOrId)) ?? addressOrId}
</span>
{showAddressOrIdAndLabel && label ? `(${label})` : ''}
{ens ? `(${ens})` : ''}
</Link>
</Button>
) : (
Expand All @@ -101,7 +83,6 @@ export default function SmartLinkGroup({
{(label ? truncateAddress(label) : truncateAddress(addressOrId)) ??
addressOrId}
</span>
{ens ? `(${ens})` : ''}
</div>
)}

Expand Down
22 changes: 1 addition & 21 deletions src/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import arbitrumSepoliaIcon from './assets/chain-icons/arbitrum-sepolia.svg';
import iexecLogo from './assets/iexec-logo.svg';
import { bellecour, arbitrumSepolia, arbitrum } from './utils/wagmiNetworks';
import { arbitrumSepolia, arbitrum } from './utils/wagmiNetworks';

export const LOCAL_STORAGE_PREFIX = 'Explorer';

Expand Down Expand Up @@ -45,25 +44,6 @@ export const SUPPORTED_CHAINS = [
wagmiNetwork: arbitrumSepolia,
tokenSymbol: 'RLC',
},
{
id: 134,
deprecated: true,
name: 'Bellecour',
slug: 'bellecour',
color: '#95A4FC',
icon: iexecLogo,
blockExplorerUrl: 'https://blockscout-bellecour.iex.ec',
subgraphUrl: {
poco: 'https://thegraph.iex.ec/subgraphs/name/bellecour/poco-v5',
dataprotector:
'https://thegraph.iex.ec/subgraphs/name/bellecour/dataprotector-v2',
},
bridge: 'https://bridge-bellecour.iex.ec/',
bridgeInformation:
'Move your xRLC in your wallet between bellecour and Ethereum Mainnet with our bridge.',
wagmiNetwork: bellecour,
tokenSymbol: 'xRLC',
},
];

export const datasetSchemaTypeGroups = [
Expand Down
16 changes: 0 additions & 16 deletions src/externals/iexecSdkClient.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
import { IExec, IExecConfig, Eip1193Provider } from 'iexec';
import { type Connector } from 'wagmi';
import { getChainFromId } from '@/utils/chain.utils';

let iExec: IExec | null = null;
let readonlyIExec: IExec | null = null;

// Basic promise queue for pending getIExec() requests
const IEXEC_CLIENT_RESOLVES: Array<Promise<IExec>> = [];

// Clean both SDKs
export function cleanIExecSDKs() {
iExec = null;
readonlyIExec = null;
}

export async function initIExecSDKs({
Expand Down Expand Up @@ -51,16 +48,3 @@ export function getIExec(): Promise<IExec> {
}
return Promise.resolve(iExec);
}

export function getReadonlyIExec(chainId: number): IExec {
const chain = getChainFromId(chainId);
if (!chain) throw new Error(`Unknown chainId ${chainId}`);

if (!readonlyIExec) {
readonlyIExec = new IExec(
{ ethProvider: chain.id },
{ allowExperimentalNetworks: true }
);
}
return readonlyIExec;
}
11 changes: 1 addition & 10 deletions src/modules/account/ManageIexecAccount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { cn } from '@/lib/utils';
import { useMutation, useQuery } from '@tanstack/react-query';
import { formatRLC } from 'iexec/utils';
import { ArrowRight, Check } from 'lucide-react';
import { useEffect, useState } from 'react';
import { useState } from 'react';
import { ChainLink } from '@/components/ChainLink';
import { Stepper } from '@/components/Stepper';
import IexecAccountIcon from '@/components/icons/IexecAccountIcon';
Expand Down Expand Up @@ -144,15 +144,6 @@ export function ManageIexecAccount() {
const [currentStep] = getStepState(currentTab);
const token = getChainFromId(chainId)?.tokenSymbol;

useEffect(() => {
const chain = getChainFromId(chainId);
const bridge = chain?.bridge;

if (!bridge && currentTab === 2) {
setCurrentTab(1);
}
}, [chainId, currentTab, setCurrentTab]);

if (!userAddress) {
return (
<div className="mt-20 flex flex-col items-center justify-center gap-6 text-center">
Expand Down
25 changes: 2 additions & 23 deletions src/modules/account/getTabs.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DefaultError } from '@tanstack/query-core';
import { UseMutationResult } from '@tanstack/react-query';
import { formatRLC } from 'iexec/utils';
import { LoaderCircle, CheckCircle, ExternalLink } from 'lucide-react';
import { LoaderCircle, CheckCircle } from 'lucide-react';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { getChainFromId } from '@/utils/chain.utils';
Expand Down Expand Up @@ -174,26 +174,5 @@ export function getTabs({
},
],
},
{
title: `BRIDGE ${token}`,
longTitle: `Bridge your ${token} between chains`,
desc: getChainFromId(chainId)?.bridgeInformation,
content: (
<Button asChild>
<a
href={getChainFromId(chainId)?.bridge}
rel="noreferrer"
target="_blank"
>
Bridge <ExternalLink />
</a>
</Button>
),
},
].filter((tab, index) => {
const chain = getChainFromId(chainId);
if (index === 0 && (!chain || chain.deprecated)) return false; // hide deposit if chain is deprecated
if (index === 2 && (!chain || !chain.bridge)) return false;
return true;
});
];
}
Loading
Loading