Skip to content
Merged
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
1 change: 1 addition & 0 deletions .github/workflows/cd-subgraph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
- name: ethereum
- name: polygon
- name: sepolia
- name: aurora-testnet
fail-fast: true
max-parallel: 3
steps:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { ChainId } from '@human-protocol/sdk/src/enums';

import AuroraIcon from '@/shared/ui/icons/AuroraIcon';
import BinanceSmartChainIcon from '@/shared/ui/icons/BinanceSmartChainIcon';
import EthereumIcon from '@/shared/ui/icons/EthereumIcon';
import HumanIcon from '@/shared/ui/icons/HumanIcon';
Expand All @@ -17,6 +18,8 @@ export const NetworkIcon = ({ chainId }: { chainId: ChainId }) => {
case 137:
case 80002:
return <PolygonIcon />;
case 1313161555:
return <AuroraIcon />;
default:
return <HumanIcon />;
}
Expand Down
16 changes: 16 additions & 0 deletions packages/apps/dashboard/client/src/shared/ui/icons/AuroraIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import type { FC } from 'react';

import SvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon';

const AuroraIcon: FC<SvgIconProps> = (props) => {
return (
<SvgIcon width="16" height="17" viewBox="0 0 16 17" fill="none" {...props}>
<path
d="M8.00027 1.2429C8.3305 1.24186 8.65444 1.33327 8.93541 1.50679C9.21639 1.68032 9.44318 1.92902 9.59013 2.22477L14.5901 12.2247C14.7258 12.4958 14.7899 12.797 14.7764 13.0998C14.7629 13.4026 14.6721 13.6969 14.5128 13.9548C14.3535 14.2126 14.1309 14.4255 13.8662 14.5731C13.6014 14.7207 13.3033 14.7981 13.0002 14.798H3.00029C2.69723 14.798 2.39921 14.7205 2.13455 14.5729C1.86988 14.4252 1.64736 14.2124 1.48811 13.9545C1.32886 13.6967 1.23818 13.4024 1.22468 13.0997C1.21117 12.7969 1.2753 12.4957 1.41096 12.2247L6.41041 2.22477C6.55735 1.92902 6.78415 1.68032 7.06512 1.50679C7.3461 1.33327 7.67003 1.24186 8.00027 1.2429ZM8.00027 0.0205078C7.44323 0.0204525 6.89717 0.175489 6.42327 0.468252C5.94937 0.761015 5.56633 1.17994 5.31708 1.6781L0.317097 11.6781C0.0882338 12.1355 -0.0198864 12.6438 0.00300726 13.1547C0.025901 13.6657 0.179048 14.1623 0.447902 14.5974C0.716755 15.0325 1.09239 15.3917 1.53911 15.6407C1.98584 15.8898 2.48882 16.0205 3.00029 16.0204H13.0002C13.5117 16.0204 14.0146 15.8896 14.4612 15.6405C14.9079 15.3914 15.2834 15.0323 15.5522 14.5972C15.821 14.1621 15.9741 13.6655 15.997 13.1546C16.0199 12.6437 15.9117 12.1354 15.6829 11.6781L10.6835 1.6781C10.4342 1.17994 10.0512 0.761015 9.57726 0.468252C9.10336 0.175489 8.55731 0.0204525 8.00027 0.0205078Z"
fill="currentColor"
/>
</SvgIcon>
);
};

export default AuroraIcon;
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ export class NetworkConfigService {
rpcUrl: this.configService.get<string>('RPC_URL_BSC_TESTNET'),
},
}),
...(this.configService.get<string>('RPC_URL_AURORA_TESTNET') && {
auroratest: {
chainId: ChainId.AURORA_TESTNET,
rpcUrl: this.configService.get<string>('RPC_URL_AURORA_TESTNET'),
},
}),
...(this.configService.get<string>('RPC_URL_LOCALHOST') && {
localhost: {
chainId: ChainId.LOCALHOST,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const TESTNET_CHAIN_IDS = [
ChainId.BSC_TESTNET,
ChainId.POLYGON_AMOY,
ChainId.SEPOLIA,
ChainId.AURORA_TESTNET,
];
export const MAINNET_CHAIN_IDS = [
ChainId.MAINNET,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ describe('NetworksService', () => {
process.env.RPC_URL_POLYGON = 'https://testrpc.com';
process.env.RPC_URL_BSC_MAINNET = 'https://testrpc.com';
process.env.RPC_URL_ETHEREUM = 'https://testrpc.com';
process.env.RPC_URL_AURORA_TESTNET = 'https://testrpc.com';
process.env.WEB3_ENV = 'mainnet';
});

Expand Down
1 change: 1 addition & 0 deletions packages/apps/faucet/client/src/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ export const FAUCET_CHAIN_IDS = [
ChainId.SEPOLIA,
ChainId.BSC_TESTNET,
ChainId.POLYGON_AMOY,
ChainId.AURORA_TESTNET,
];
5 changes: 1 addition & 4 deletions packages/apps/faucet/server/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ ADDRESS_WAITING_TIME=3600
RPC_URL_SEPOLIA=""
RPC_URL_BSC_TESTNET=""
RPC_URL_POLYGON_AMOY=""
RPC_URL_MOONBASE_ALPHA=""
RPC_URL_AVALANCHE_TESTNET=""
RPC_URL_CELO_ALFAJORES=""
RPC_URL_XLAYER_TESTNET=""
RPC_URL_AURORA_TESTNET=""

# Balance threshold
FAUCET_MIN_BALANCE=
Expand Down
3 changes: 3 additions & 0 deletions packages/apps/faucet/server/src/constants/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ export const FAUCET_NETWORKS: {
[ChainId.POLYGON_AMOY]: {
rpcUrl: process.env.RPC_URL_POLYGON_AMOY || '',
},
[ChainId.AURORA_TESTNET]: {
rpcUrl: process.env.RPC_URL_AURORA_TESTNET || '',
},
[ChainId.LOCALHOST]: {
rpcUrl: process.env.RPC_PORT
? `http://127.0.0.1:${process.env.RPC_PORT}`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ export const envValidator = Joi.object({
RPC_URL_BSC: Joi.string(),
RPC_URL_POLYGON_AMOY: Joi.string(),
RPC_URL_SEPOLIA: Joi.string(),
RPC_URL_MOONBEAM: Joi.string(),
RPC_URL_BSC_TESTNET: Joi.string(),
RPC_URL_XLAYER: Joi.string(),
RPC_URL_AURORA_TESTNET: Joi.string(),
RPC_URL_LOCALHOST: Joi.string(),
// S3
S3_ENDPOINT: Joi.string(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@ export class NetworkConfigService {
rpcUrl: this.configService.get<string>('RPC_URL_BSC_TESTNET'),
},
}),
...(this.configService.get<string>('RPC_URL_AURORA_TESTNET') && {
auroratest: {
chainId: ChainId.AURORA_TESTNET,
/**
* The RPC URL for the AURORA Testnet network.
*/
rpcUrl: this.configService.get<string>('RPC_URL_AURORA_TESTNET'),
},
}),
...(this.configService.get<string>('RPC_URL_LOCALHOST') && {
localhost: {
chainId: ChainId.LOCALHOST,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const TESTNET_CHAIN_IDS = [
ChainId.POLYGON_AMOY,
ChainId.BSC_TESTNET,
ChainId.SEPOLIA,
ChainId.AURORA_TESTNET,
];
export const MAINNET_CHAIN_IDS = [ChainId.POLYGON, ChainId.BSC_MAINNET];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const envValidator = Joi.object({
RPC_URL_SEPOLIA: Joi.string(),
RPC_URL_MOONBEAM: Joi.string(),
RPC_URL_BSC_TESTNET: Joi.string(),
RPC_URL_AURORA_TESTNET: Joi.string(),
RPC_URL_LOCALHOST: Joi.string(),
// S3
S3_ENDPOINT: Joi.string(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@ export class NetworkConfigService {
rpcUrl: this.configService.get<string>('RPC_URL_BSC_TESTNET'),
},
}),
...(this.configService.get<string>('RPC_URL_AURORA_TESTNET') && {
bsctest: {
chainId: ChainId.AURORA_TESTNET,
/**
* The RPC URL for the AURORA Testnet network.
*/
rpcUrl: this.configService.get<string>('RPC_URL_AURORA_TESTNET'),
},
}),
...(this.configService.get<string>('RPC_URL_LOCALHOST') && {
localhost: {
chainId: ChainId.LOCALHOST,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export const TestnetChainsIds = [
ChainId.POLYGON_AMOY,
ChainId.SEPOLIA,
ChainId.BSC_TESTNET,
ChainId.AURORA_TESTNET,
ChainId.LOCALHOST,
] as const;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import SvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon';
import type { FC } from 'react';

export const AuroraIcon: FC<SvgIconProps> = (props) => {
return (
<SvgIcon width="16" height="17" viewBox="0 0 16 17" fill="none" {...props}>
<path
d="M8.00027 1.2429C8.3305 1.24186 8.65444 1.33327 8.93541 1.50679C9.21639 1.68032 9.44318 1.92902 9.59013 2.22477L14.5901 12.2247C14.7258 12.4958 14.7899 12.797 14.7764 13.0998C14.7629 13.4026 14.6721 13.6969 14.5128 13.9548C14.3535 14.2126 14.1309 14.4255 13.8662 14.5731C13.6014 14.7207 13.3033 14.7981 13.0002 14.798H3.00029C2.69723 14.798 2.39921 14.7205 2.13455 14.5729C1.86988 14.4252 1.64736 14.2124 1.48811 13.9545C1.32886 13.6967 1.23818 13.4024 1.22468 13.0997C1.21117 12.7969 1.2753 12.4957 1.41096 12.2247L6.41041 2.22477C6.55735 1.92902 6.78415 1.68032 7.06512 1.50679C7.3461 1.33327 7.67003 1.24186 8.00027 1.2429ZM8.00027 0.0205078C7.44323 0.0204525 6.89717 0.175489 6.42327 0.468252C5.94937 0.761015 5.56633 1.17994 5.31708 1.6781L0.317097 11.6781C0.0882338 12.1355 -0.0198864 12.6438 0.00300726 13.1547C0.025901 13.6657 0.179048 14.1623 0.447902 14.5974C0.716755 15.0325 1.09239 15.3917 1.53911 15.6407C1.98584 15.8898 2.48882 16.0205 3.00029 16.0204H13.0002C13.5117 16.0204 14.0146 15.8896 14.4612 15.6405C14.9079 15.3914 15.2834 15.0323 15.5522 14.5972C15.821 14.1621 15.9741 13.6655 15.997 13.1546C16.0199 12.6437 15.9117 12.1354 15.6829 11.6781L10.6835 1.6781C10.4342 1.17994 10.0512 0.761015 9.57726 0.468252C9.10336 0.175489 8.55731 0.0204525 8.00027 0.0205078Z"
fill="currentColor"
/>
</SvgIcon>
);
};
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { ChainId } from '@human-protocol/sdk';
import { ReactElement } from 'react';

import { AuroraIcon } from './AuroraIcon';
import { BinanceSmartChainIcon } from './BinanceSmartChainIcon';
import { DollarSignIcon } from './DollarSignIcon';
import { EthereumIcon } from './EthereumIcon';
Expand All @@ -15,6 +16,7 @@ export const CHAIN_ICONS: { [chainId in ChainId]?: ReactElement } = {
[ChainId.POLYGON_AMOY]: <PolygonIcon />,
[ChainId.BSC_MAINNET]: <BinanceSmartChainIcon />,
[ChainId.BSC_TESTNET]: <BinanceSmartChainIcon />,
[ChainId.AURORA_TESTNET]: <AuroraIcon />,
};

export const TOKEN_ICONS: Record<string, ReactElement> = {
Expand Down
1 change: 1 addition & 0 deletions packages/apps/job-launcher/client/src/constants/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ switch (import.meta.env.VITE_APP_ENVIRONMENT.toLowerCase()) {
ChainId.BSC_TESTNET,
ChainId.POLYGON_AMOY,
ChainId.SEPOLIA,
ChainId.AURORA_TESTNET,
];
break;
case 'localhost':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export const wagmiConfig = createConfig({
wagmiChains.avalanche,
wagmiChains.xLayer,
wagmiChains.xLayerTestnet,
wagmiChains.auroraTestnet,
LOCALHOST,
],
connectors: [
Expand Down Expand Up @@ -70,6 +71,10 @@ export const wagmiConfig = createConfig({
unstable_connector(metaMask),
http(),
]),
[wagmiChains.auroraTestnet.id]: fallback([
unstable_connector(metaMask),
http(),
]),
[LOCALHOST.id]: fallback([
unstable_connector(metaMask),
http(LOCALHOST.rpcUrls.default.http[0]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export const envValidator = Joi.object({
RPC_URL_POLYGON_AMOY: Joi.string(),
RPC_URL_BSC_MAINNET: Joi.string(),
RPC_URL_BSC_TESTNET: Joi.string(),
RPC_URL_AURORA_TESTNET: Joi.string(),
RPC_URL_MOONBEAM: Joi.string(),
RPC_URL_XLAYER_TESTNET: Joi.string(),
RPC_URL_XLAYER: Joi.string(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,15 @@ export class NetworkConfigService {
rpcUrl: this.configService.get<string>('RPC_URL_BSC_TESTNET'),
},
}),
...(this.configService.get<string>('RPC_URL_AURORA_TESTNET') && {
auroratest: {
chainId: ChainId.AURORA_TESTNET,
/**
* The RPC URL for the AURORA Testnet network.
*/
rpcUrl: this.configService.get<string>('RPC_URL_AURORA_TESTNET'),
},
}),
...(this.configService.get<string>('RPC_URL_LOCALHOST') && {
localhost: {
chainId: ChainId.LOCALHOST,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const TESTNET_CHAIN_IDS = [
ChainId.BSC_TESTNET,
ChainId.POLYGON_AMOY,
ChainId.SEPOLIA,
ChainId.AURORA_TESTNET,
];
export const MAINNET_CHAIN_IDS = [ChainId.BSC_MAINNET, ChainId.POLYGON];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ export const TOKEN_ADDRESSES: {
},
// [EscrowFundToken.USDC]: { address: '0x41e94eb019c0762f9bfcf9fb1e58725bfb0e7582', decimals: 6 },
},
[ChainId.AURORA_TESTNET]: {
[EscrowFundToken.HMT]: {
address: NETWORKS[ChainId.AURORA_TESTNET]!.hmtAddress,
decimals: 18,
},
// [EscrowFundToken.USDC]: { address: '0x41e94eb019c0762f9bfcf9fb1e58725bfb0e7582', decimals: 6 },
},
[ChainId.LOCALHOST]: {
[EscrowFundToken.HMT]: {
address: NETWORKS[ChainId.LOCALHOST]!.hmtAddress,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export const envValidator = Joi.object({
RPC_URL_POLYGON_AMOY: Joi.string().uri({ scheme: ['http', 'https'] }),
RPC_URL_BSC_MAINNET: Joi.string().uri({ scheme: ['http', 'https'] }),
RPC_URL_BSC_TESTNET: Joi.string().uri({ scheme: ['http', 'https'] }),
RPC_URL_AURORA_TESTNET: Joi.string().uri({ scheme: ['http', 'https'] }),
RPC_URL_MOONBEAM: Joi.string().uri({ scheme: ['http', 'https'] }),
RPC_URL_XLAYER_TESTNET: Joi.string().uri({ scheme: ['http', 'https'] }),
RPC_URL_XLAYER: Joi.string().uri({ scheme: ['http', 'https'] }),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ export class Web3ConfigService {
[ChainId.POLYGON_AMOY]: this.configService.get('RPC_URL_POLYGON_AMOY'),
[ChainId.BSC_MAINNET]: this.configService.get('RPC_URL_BSC_MAINNET'),
[ChainId.BSC_TESTNET]: this.configService.get('RPC_URL_BSC_TESTNET'),
[ChainId.AURORA_TESTNET]: this.configService.get(
'RPC_URL_AURORA_TESTNET',
),
[ChainId.SEPOLIA]: this.configService.get('RPC_URL_SEPOLIA'),
[ChainId.LOCALHOST]: this.configService.get('RPC_URL_LOCALHOST'),
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const supportedChainIdsByNetwork = {
ChainId.POLYGON_AMOY,
ChainId.BSC_TESTNET,
ChainId.SEPOLIA,
ChainId.AURORA_TESTNET,
],
[Web3Network.LOCAL]: [ChainId.LOCALHOST],
} as const;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import type { FC } from 'react';

import SvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon';

const AuroraIcon: FC<SvgIconProps> = (props) => {
return (
<SvgIcon width="16" height="17" viewBox="0 0 16 17" fill="none" {...props}>
<path
d="M8.00027 1.2429C8.3305 1.24186 8.65444 1.33327 8.93541 1.50679C9.21639 1.68032 9.44318 1.92902 9.59013 2.22477L14.5901 12.2247C14.7258 12.4958 14.7899 12.797 14.7764 13.0998C14.7629 13.4026 14.6721 13.6969 14.5128 13.9548C14.3535 14.2126 14.1309 14.4255 13.8662 14.5731C13.6014 14.7207 13.3033 14.7981 13.0002 14.798H3.00029C2.69723 14.798 2.39921 14.7205 2.13455 14.5729C1.86988 14.4252 1.64736 14.2124 1.48811 13.9545C1.32886 13.6967 1.23818 13.4024 1.22468 13.0997C1.21117 12.7969 1.2753 12.4957 1.41096 12.2247L6.41041 2.22477C6.55735 1.92902 6.78415 1.68032 7.06512 1.50679C7.3461 1.33327 7.67003 1.24186 8.00027 1.2429ZM8.00027 0.0205078C7.44323 0.0204525 6.89717 0.175489 6.42327 0.468252C5.94937 0.761015 5.56633 1.17994 5.31708 1.6781L0.317097 11.6781C0.0882338 12.1355 -0.0198864 12.6438 0.00300726 13.1547C0.025901 13.6657 0.179048 14.1623 0.447902 14.5974C0.716755 15.0325 1.09239 15.3917 1.53911 15.6407C1.98584 15.8898 2.48882 16.0205 3.00029 16.0204H13.0002C13.5117 16.0204 14.0146 15.8896 14.4612 15.6405C14.9079 15.3914 15.2834 15.0323 15.5522 14.5972C15.821 14.1621 15.9741 13.6655 15.997 13.1546C16.0199 12.6437 15.9117 12.1354 15.6829 11.6781L10.6835 1.6781C10.4342 1.17994 10.0512 0.761015 9.57726 0.468252C9.10336 0.175489 8.55731 0.0204525 8.00027 0.0205078Z"
fill="currentColor"
/>
</SvgIcon>
);
};

export default AuroraIcon;
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import MoonbeamIcon from './Icons/MoonbeamIcon';
import MoonbaseAlphaIcon from './Icons/MoonbaseAlphaIcon';
import { XLayerIcon } from './Icons/XLayerIcon';
import { AvalancheIcon } from './Icons/AvalancheIcon';
import AuroraIcon from './Icons/AuroraIcon';

export const NetworkIcon = ({ chainId }: { chainId?: number }) => {
const icon = (() => {
Expand All @@ -31,6 +32,8 @@ export const NetworkIcon = ({ chainId }: { chainId?: number }) => {
case 43113:
case 43114:
return <AvalancheIcon />;
case 1313161555:
return <AuroraIcon />;
default:
return <PolygonIcon />;
}
Expand Down
1 change: 1 addition & 0 deletions packages/apps/staking/src/constants/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ switch (import.meta.env.VITE_APP_ENVIRONMENT.toLowerCase()) {
ChainId.BSC_TESTNET,
ChainId.POLYGON_AMOY,
ChainId.SEPOLIA,
ChainId.AURORA_TESTNET,
];
break;
case 'localhost':
Expand Down
7 changes: 1 addition & 6 deletions packages/apps/staking/src/providers/WagmiProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@ const chainIdToChainMap: Record<number, any> = {
[wagmiChains.bscTestnet.id]: wagmiChains.bscTestnet,
[wagmiChains.polygon.id]: wagmiChains.polygon,
[wagmiChains.polygonAmoy.id]: wagmiChains.polygonAmoy,
[wagmiChains.moonbeam.id]: wagmiChains.moonbeam,
[wagmiChains.moonbaseAlpha.id]: wagmiChains.moonbaseAlpha,
[wagmiChains.avalanche.id]: wagmiChains.avalanche,
[wagmiChains.avalancheFuji.id]: wagmiChains.avalancheFuji,
[wagmiChains.xLayer.id]: wagmiChains.xLayer,
[wagmiChains.xLayerTestnet.id]: wagmiChains.xLayerTestnet,
[wagmiChains.auroraTestnet.id]: wagmiChains.auroraTestnet,
[LOCALHOST.id]: LOCALHOST,
};

Expand Down
2 changes: 1 addition & 1 deletion packages/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ yarn upgrade:proxy --network [NETWORK_NAME]
5. Verify the contract runing the following line:

```bash
yarn dlx hardhat verify --network [NETWORK_NAME] [CONTRACT_ADDRESS]
npx hardhat verify --network [NETWORK_NAME] [CONTRACT_ADDRESS]
```

## Documentation
Expand Down
Loading
Loading