Skip to content

Commit

Permalink
Add Celo integration
Browse files Browse the repository at this point in the history
  • Loading branch information
leetdev committed Nov 7, 2023
1 parent 8afa991 commit f914652
Show file tree
Hide file tree
Showing 33 changed files with 1,581 additions and 21 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/cd-subgraph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ jobs:
graph: fuji-v2
- name: avalanche
graph: avalanche-v2
- name: celo
graph: celo
- name: celo-alfajores
graph: celo-alfajores
fail-fast: true
max-parallel: 3
steps:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ yarn-error.log*
# Built Visual Studio Code extensions
*.vsix

# IDE - IntelliJ
.idea/

# OS
.DS_Store

Expand Down
16 changes: 16 additions & 0 deletions CONTRACTS_LIST.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,22 @@
|2023/03/21 | RewardPool | 0xca8745D76588C2aa8bA13E8ef14E986b8A74EE3E | 0x881218246c25C6898aE96145259584340153aDA2 |
|2023/03/22 | EthKVStore | 0xE1055607327b1be2080D31211dCDC4D9338CaF4A | N/A |

|🟢 Celo (Mainnet) | Contract | Address | Proxy |
|----------------------------|----------------|--------------------------------------------|--------------------------------------------|
|2023/10/20 | HMToken | 0x19Ead835951493A763c96910255d5eeF147E914F | N/A |
|2023/10/31 | EscrowFactory | 0x003548Df34be8836cF0F9673403a1E40ba449a0F | 0xc90B43a5d576D9d8026c48904dfbaED50C15Fa08 |
|2023/10/31 | Staking | 0x2736B33455A872dC478E1E004106D04c35472468 | 0x34cD3Bd6B16c559f321799b516dE61E12017fFd1 |
|2023/10/31 | RewardPool | 0x938335006ea6F9Eb0e8020969cFF94404425e298 | 0xb9344bAD98E3d26a4d83900922baf395a2Ec154c |
|2023/10/31 | EthKVStore | 0x86Af9f6Cd34B69Db1B202223C6d6D109f2491569 | N/A |

|🟠 Celo Alfajores (Testnet) | Contract | Address | Proxy |
|----------------------------|----------------|--------------------------------------------|--------------------------------------------|
|2023/10/20 | HMToken | 0x2736B33455A872dC478E1E004106D04c35472468 | N/A |
|2023/10/20 | EscrowFactory | 0xc90B43a5d576D9d8026c48904dfbaED50C15Fa08 | 0x86Af9f6Cd34B69Db1B202223C6d6D109f2491569 |
|2023/10/20 | Staking | 0x34cD3Bd6B16c559f321799b516dE61E12017fFd1 | 0x003548Df34be8836cF0F9673403a1E40ba449a0F |
|2023/10/20 | RewardPool | 0xb9344bAD98E3d26a4d83900922baf395a2Ec154c | 0xA9545C2530BD5bdb464d5E274F59ACceAa73eD86 |
|2023/10/20 | EthKVStore | 0x938335006ea6F9Eb0e8020969cFF94404425e298 | N/A |



# Old contracts
Expand Down
13 changes: 13 additions & 0 deletions packages/apps/escrow-dashboard/src/components/Icons/CeloIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon';
import { FC } from 'react';

export const CeloIcon: FC<SvgIconProps> = (props) => {
return (
<SvgIcon width="17" height="15" viewBox="0 0 17 15" fill="none" {...props}>
<path
d="M 5.921875 13.421875 C 8.320312 13.421875 10.261719 11.476562 10.261719 9.078125 C 10.261719 6.679688 8.320312 4.738281 5.921875 4.738281 C 3.523438 4.738281 1.578125 6.679688 1.578125 9.078125 C 1.578125 11.476562 3.523438 13.421875 5.921875 13.421875 Z M 5.921875 15 C 2.652344 15 0 12.347656 0 9.078125 C 0 5.808594 2.652344 3.15625 5.921875 3.15625 C 9.191406 3.15625 11.84375 5.808594 11.84375 9.078125 C 11.84375 12.347656 9.191406 15 5.921875 15 Z M 9.078125 10.261719 C 11.476562 10.261719 13.421875 8.320312 13.421875 5.921875 C 13.421875 3.523438 11.476562 1.578125 9.078125 1.578125 C 6.679688 1.578125 4.738281 3.523438 4.738281 5.921875 C 4.738281 8.320312 6.679688 10.261719 9.078125 10.261719 Z M 9.078125 11.84375 C 5.808594 11.84375 3.15625 9.191406 3.15625 5.921875 C 3.15625 2.652344 5.808594 0 9.078125 0 C 12.347656 0 15 2.652344 15 5.921875 C 15 9.191406 12.347656 11.84375 9.078125 11.84375 Z M 9.273438 11.84375 C 9.683594 11.34375 9.980469 10.761719 10.136719 10.136719 C 10.761719 9.980469 11.34375 9.683594 11.84375 9.273438 C 11.820312 10 11.664062 10.714844 11.382812 11.382812 C 10.714844 11.664062 10 11.820312 9.273438 11.84375 Z M 4.863281 4.863281 C 4.238281 5.019531 3.65625 5.316406 3.15625 5.726562 C 3.179688 5 3.335938 4.285156 3.617188 3.617188 C 4.285156 3.339844 5.003906 3.179688 5.726562 3.15625 C 5.316406 3.65625 5.019531 4.238281 4.863281 4.863281 Z M 4.863281 4.863281"
fill="currentColor"
/>
</SvgIcon>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { ReactElement } from 'react';

import { AvalancheIcon } from './AvalancheIcon';
import { BinanceSmartChainIcon } from './BinanceSmartChainIcon';
import { CeloIcon } from './CeloIcon';
import { EthereumIcon } from './EthereumIcon';
import { HumanIcon } from './HumanIcon';
import { MoonbaseAlphaIcon } from './MoonbaseAlphaIcon';
Expand All @@ -24,4 +25,6 @@ export const CHAIN_ICONS: { [chainId in ChainId]?: ReactElement } = {
[ChainId.AVALANCHE]: <AvalancheIcon />,
[ChainId.AVALANCHE_TESTNET]: <AvalancheIcon />,
[ChainId.SKALE]: <SkaleHumanProtocolIcon />,
[ChainId.CELO]: <CeloIcon />,
[ChainId.CELO_ALFAJORES]: <CeloIcon />,
};
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export { AvalancheIcon } from './AvalancheIcon';
export { BinanceSmartChainIcon } from './BinanceSmartChainIcon';
export { BitfinexIcon } from './BitfinexIcon';
export { CeloIcon } from './CeloIcon';
export { CopyFilledIcon } from './CopyFilledIcon';
export { CopyLinkIcon } from './CopyLinkIcon';
export { DiscordIcon } from './DiscordIcon';
Expand Down
8 changes: 8 additions & 0 deletions packages/apps/escrow-dashboard/src/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ export const V2_SUPPORTED_CHAIN_IDS = [
ChainId.POLYGON_MUMBAI,
ChainId.MOONBEAM,
ChainId.MOONBASE_ALPHA,
ChainId.CELO,
ChainId.CELO_ALFAJORES,
// ChainId.SKALE,
// ChainId.AVALANCHE,
// ChainId.AVALANCHE_TESTNET,
Expand All @@ -27,6 +29,8 @@ export const SUPPORTED_CHAIN_IDS = [
ChainId.MOONBASE_ALPHA,
ChainId.AVALANCHE_TESTNET,
ChainId.AVALANCHE,
ChainId.CELO,
ChainId.CELO_ALFAJORES,
];

export const L1_L2_CHAIN_IDS = [
Expand All @@ -44,6 +48,7 @@ export const TESTNET_CHAIN_IDS = [
ChainId.POLYGON_MUMBAI,
ChainId.MOONBASE_ALPHA,
ChainId.AVALANCHE_TESTNET,
ChainId.CELO_ALFAJORES,
];

export const FAUCET_CHAIN_IDS = [
Expand All @@ -53,6 +58,7 @@ export const FAUCET_CHAIN_IDS = [
ChainId.MOONBASE_ALPHA,
ChainId.AVALANCHE_TESTNET,
ChainId.SKALE,
ChainId.CELO_ALFAJORES,
];

export const RPC_URLS: {
Expand All @@ -71,6 +77,8 @@ export const RPC_URLS: {
[ChainId.AVALANCHE_TESTNET]: 'https://api.avax-test.network/ext/C/rpc',
[ChainId.AVALANCHE]: 'https://api.avax.network/ext/bc/C/rpc',
[ChainId.SKALE]: 'https://mainnet.skalenodes.com/v1/wan-red-ain',
[ChainId.CELO_ALFAJORES]: 'https://alfajores-forno.celo-testnet.org',
[ChainId.CELO]: 'https://forno.celo.org',
};

export const FAST_INTERVAL = 10_000;
Expand Down
8 changes: 8 additions & 0 deletions packages/apps/faucet-server/src/constants/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ export enum ChainId {
POLYGON_MUMBAI = 80001,
MOONBEAM = 1284,
MOONBASE_ALPHA = 1287,
CELO = 42220,
CELO_ALFAJORES = 44787,
LOCALHOST = 1338,
SKALE = 1273227453,
}
Expand Down Expand Up @@ -78,6 +80,12 @@ export const FAUCET_NETWORKS: {
rpcUrl: 'https://rpc.api.moonbase.moonbeam.network',
hmtAddress: '0x2dd72db2bBA65cE663e476bA8b84A1aAF802A8e3',
},
[ChainId.CELO_ALFAJORES]: {
chainId: ChainId.MOONBASE_ALPHA,
title: 'Celo Alfajores',
rpcUrl: 'https://alfajores-forno.celo-testnet.org',
hmtAddress: '0x2736B33455A872dC478E1E004106D04c35472468',
},
[ChainId.SKALE]: {
chainId: ChainId.SKALE,
title: 'SKALE Human Protocol chain',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon';
import { FC } from 'react';

export const CeloIcon: FC<SvgIconProps> = (props) => {
return (
<SvgIcon width="17" height="15" viewBox="0 0 17 15" fill="none" {...props}>
<path
d="M 5.921875 13.421875 C 8.320312 13.421875 10.261719 11.476562 10.261719 9.078125 C 10.261719 6.679688 8.320312 4.738281 5.921875 4.738281 C 3.523438 4.738281 1.578125 6.679688 1.578125 9.078125 C 1.578125 11.476562 3.523438 13.421875 5.921875 13.421875 Z M 5.921875 15 C 2.652344 15 0 12.347656 0 9.078125 C 0 5.808594 2.652344 3.15625 5.921875 3.15625 C 9.191406 3.15625 11.84375 5.808594 11.84375 9.078125 C 11.84375 12.347656 9.191406 15 5.921875 15 Z M 9.078125 10.261719 C 11.476562 10.261719 13.421875 8.320312 13.421875 5.921875 C 13.421875 3.523438 11.476562 1.578125 9.078125 1.578125 C 6.679688 1.578125 4.738281 3.523438 4.738281 5.921875 C 4.738281 8.320312 6.679688 10.261719 9.078125 10.261719 Z M 9.078125 11.84375 C 5.808594 11.84375 3.15625 9.191406 3.15625 5.921875 C 3.15625 2.652344 5.808594 0 9.078125 0 C 12.347656 0 15 2.652344 15 5.921875 C 15 9.191406 12.347656 11.84375 9.078125 11.84375 Z M 9.273438 11.84375 C 9.683594 11.34375 9.980469 10.761719 10.136719 10.136719 C 10.761719 9.980469 11.34375 9.683594 11.84375 9.273438 C 11.820312 10 11.664062 10.714844 11.382812 11.382812 C 10.714844 11.664062 10 11.820312 9.273438 11.84375 Z M 4.863281 4.863281 C 4.238281 5.019531 3.65625 5.316406 3.15625 5.726562 C 3.179688 5 3.335938 4.285156 3.617188 3.617188 C 4.285156 3.339844 5.003906 3.179688 5.726562 3.15625 C 5.316406 3.65625 5.019531 4.238281 4.863281 4.863281 Z M 4.863281 4.863281"
fill="currentColor"
/>
</SvgIcon>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { ReactElement } from 'react';

import { AvalancheIcon } from './AvalancheIcon';
import { BinanceSmartChainIcon } from './BinanceSmartChainIcon';
import { CeloIcon } from './CeloIcon';
import { EthereumIcon } from './EthereumIcon';
import { HumanIcon } from './HumanIcon';
import { MoonbaseAlphaIcon } from './MoonbaseAlphaIcon';
Expand All @@ -24,6 +25,8 @@ export const CHAIN_ICONS: { [chainId in ChainId]?: ReactElement } = {
[ChainId.AVALANCHE]: <AvalancheIcon />,
[ChainId.AVALANCHE_TESTNET]: <AvalancheIcon />,
[ChainId.SKALE]: <SkaleHumanProtocolIcon />,
[ChainId.CELO]: <CeloIcon />,
[ChainId.CELO_ALFAJORES]: <CeloIcon />,
};

export const TOKEN_ICONS: Record<string, ReactElement> = {
Expand Down
2 changes: 2 additions & 0 deletions packages/apps/job-launcher/client/src/constants/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,6 @@ export const RPC_URLS: {
[ChainId.AVALANCHE_TESTNET]: 'https://api.avax-test.network/ext/C/rpc',
[ChainId.AVALANCHE]: 'https://api.avax.network/ext/bc/C/rpc',
[ChainId.SKALE]: 'https://mainnet.skalenodes.com/v1/wan-red-ain',
[ChainId.CELO_ALFAJORES]: 'https://alfajores-forno.celo-testnet.org',
[ChainId.CELO]: 'https://forno.celo.org',
};
1 change: 1 addition & 0 deletions packages/core/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ TENDERLY_FORK_ID=
# The same API key works usually for both testnet and mainnet

ETHERSCAN_API_KEY=
CELOSCAN_API_KEY=

# Below are working open RPC clients
# Find more available RPC URLs at https://rpc.info
Expand Down
Loading

0 comments on commit f914652

Please sign in to comment.