Skip to content

Commit

Permalink
add arb (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
mehdi-torabiv authored Dec 3, 2024
1 parent 5a5e146 commit ff20fde
Show file tree
Hide file tree
Showing 8 changed files with 408 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
} from '@rainbow-me/rainbowkit';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { Navigate, Route, Routes } from 'react-router-dom';
import { baseSepolia } from 'viem/chains';
import { arbitrum } from 'viem/chains';
import { useAccount } from 'wagmi';

import MobileScreensContainer from './components/layouts/MobileScreensContainer';
Expand Down Expand Up @@ -54,7 +54,7 @@ const App: React.FC = () => {
status={authStatus}
>
<RainbowKitProvider
initialChain={chainId ?? baseSepolia}
initialChain={chainId ?? arbitrum}
theme={lightTheme({
accentColor: '#4200FF',
})}
Expand Down
1 change: 1 addition & 0 deletions src/hooks/useAttestations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ interface ProcessedAttestation {

const useAttestations = () => {
const { address, chainId } = useAccount();

const {
data: attestationsResponse,
error,
Expand Down
6 changes: 3 additions & 3 deletions src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { CssBaseline } from '@mui/material';
import { getDefaultConfig } from '@rainbow-me/rainbowkit';
import ReactDOM from 'react-dom/client';
import { BrowserRouter } from 'react-router-dom';
import { baseSepolia, optimismSepolia } from 'viem/chains';
import { arbitrum, baseSepolia, optimismSepolia } from 'viem/chains';
import { http, WagmiProvider } from 'wagmi';

import App from './App';
Expand All @@ -17,12 +17,12 @@ if (!import.meta.env.VITE_PROJECT_ID) {
}
const projectID = import.meta.env.VITE_PROJECT_ID;

export const SUPPORTED_CHAINS = [baseSepolia, optimismSepolia];
export const SUPPORTED_CHAINS = [baseSepolia, optimismSepolia, arbitrum];

const config = getDefaultConfig({
appName: 'Identity on chain platform',
projectId: projectID,
chains: [optimismSepolia, baseSepolia],
chains: [optimismSepolia, baseSepolia, arbitrum],
transports: SUPPORTED_CHAINS.reduce(
(obj, chain) => ({ ...obj, [chain.id]: http() }),
{}
Expand Down
2 changes: 1 addition & 1 deletion src/services/eas/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ export const chainIdToGraphQLEndpoint: { [key: number]: string } = {
11155111: 'https://sepolia.easscan.org/graphql',
11155420: 'https://optimism-sepolia-bedrock.easscan.org/graphql',
84532: 'https://base-sepolia.easscan.org/graphql',
42161: 'https://arbitrum.easscan.org/graphql',
// 1: "https://easscan.org/graphql",
// 42161: "https://arbitrum.easscan.org/graphql",
// 42170: "https://arbitrum-nova.easscan.org/graphql",
// 8453: "https://base.easscan.org/graphql",
// 10: "https://optimism.easscan.org/graphql",
Expand Down
234 changes: 234 additions & 0 deletions src/utils/contracts/app/contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -467,4 +467,238 @@ export const appContracts = [
},
],
},
{
chainId: 42_161,
address: '0x8006cCF2b3240bB716c86E5a16A9dD9b32eC5c53',
abi: [
{
inputs: [
{
internalType: 'address',
name: 'initialAuthority',
type: 'address',
},
],
stateMutability: 'nonpayable',
type: 'constructor',
},
{
inputs: [
{ internalType: 'address', name: 'authority', type: 'address' },
],
name: 'AccessManagedInvalidAuthority',
type: 'error',
},
{
inputs: [
{ internalType: 'address', name: 'caller', type: 'address' },
{ internalType: 'uint32', name: 'delay', type: 'uint32' },
],
name: 'AccessManagedRequiredDelay',
type: 'error',
},
{
inputs: [{ internalType: 'address', name: 'caller', type: 'address' }],
name: 'AccessManagedUnauthorized',
type: 'error',
},
{ inputs: [], name: 'ReentrancyGuardReentrantCall', type: 'error' },
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: 'uint256',
name: 'id',
type: 'uint256',
},
{
components: [
{ internalType: 'uint256', name: 'id', type: 'uint256' },
{ internalType: 'string', name: 'name', type: 'string' },
{ internalType: 'address', name: 'account', type: 'address' },
],
indexed: false,
internalType: 'struct IApplicationManager.Application',
name: 'application',
type: 'tuple',
},
],
name: 'ApplicationCreated',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: 'uint256',
name: 'id',
type: 'uint256',
},
{
components: [
{ internalType: 'uint256', name: 'id', type: 'uint256' },
{ internalType: 'string', name: 'name', type: 'string' },
{ internalType: 'address', name: 'account', type: 'address' },
],
indexed: false,
internalType: 'struct IApplicationManager.Application',
name: 'application',
type: 'tuple',
},
],
name: 'ApplicationDeleted',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: 'uint256',
name: 'id',
type: 'uint256',
},
{
components: [
{ internalType: 'uint256', name: 'id', type: 'uint256' },
{ internalType: 'string', name: 'name', type: 'string' },
{ internalType: 'address', name: 'account', type: 'address' },
],
indexed: false,
internalType: 'struct IApplicationManager.Application',
name: 'application',
type: 'tuple',
},
],
name: 'ApplicationUpdated',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: 'address',
name: 'authority',
type: 'address',
},
],
name: 'AuthorityUpdated',
type: 'event',
},
{
inputs: [],
name: 'authority',
outputs: [{ internalType: 'address', name: '', type: 'address' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{
components: [
{ internalType: 'string', name: 'name', type: 'string' },
{ internalType: 'address', name: 'account', type: 'address' },
],
internalType: 'struct IApplicationManager.ApplicationDto',
name: 'dto',
type: 'tuple',
},
],
name: 'createApplication',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'uint256', name: 'id', type: 'uint256' }],
name: 'deleteApplication',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'uint256', name: 'id', type: 'uint256' }],
name: 'getApplication',
outputs: [
{
components: [
{ internalType: 'uint256', name: 'id', type: 'uint256' },
{ internalType: 'string', name: 'name', type: 'string' },
{ internalType: 'address', name: 'account', type: 'address' },
],
internalType: 'struct IApplicationManager.Application',
name: '',
type: 'tuple',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'uint256', name: 'start', type: 'uint256' },
{ internalType: 'uint256', name: 'limit', type: 'uint256' },
],
name: 'getApplications',
outputs: [
{
components: [
{ internalType: 'uint256', name: 'id', type: 'uint256' },
{ internalType: 'string', name: 'name', type: 'string' },
{ internalType: 'address', name: 'account', type: 'address' },
],
internalType: 'struct IApplicationManager.Application[]',
name: '',
type: 'tuple[]',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'getNextApplicationId',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'isConsumingScheduledOp',
outputs: [{ internalType: 'bytes4', name: '', type: 'bytes4' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: 'newAuthority', type: 'address' },
],
name: 'setAuthority',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'uint256', name: 'id', type: 'uint256' },
{
components: [
{ internalType: 'string', name: 'name', type: 'string' },
{ internalType: 'address', name: 'account', type: 'address' },
],
internalType: 'struct IApplicationManager.ApplicationDto',
name: 'dto',
type: 'tuple',
},
],
name: 'updateApplication',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
],
},
];
1 change: 1 addition & 0 deletions src/utils/contracts/eas/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ export const EAS_SCHEMA_ID: { [key: string | number]: string } = {
11155420:
'0x2c988095892ea57c600e5cc6fb62531502bc0c8d038ac39dc3fab161b6f122db',
84532: '0xe8c59f8de4cdf61c8ebefa3ed83d714acc767dda3bbff00623e73f5a8bf5255f',
42161: '0x6b5b50f2de8b387664838bd3c751e21f6b9aac7cf4bf5b2fb86e760b89a8a22d',
};
7 changes: 7 additions & 0 deletions src/utils/contracts/eas/contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,11 @@ export const contracts = [
easContractAddress: '0x4200000000000000000000000000000000000021',
abi: [],
},
{
chainId: 42_161,
easSchemaUUID:
'0x6b5b50f2de8b387664838bd3c751e21f6b9aac7cf4bf5b2fb86e760b89a8a22d',
easContractAddress: '0xbD75f629A22Dc1ceD33dDA0b68c546A1c035c458',
abi: [],
},
];
Loading

0 comments on commit ff20fde

Please sign in to comment.